From 74de91e2bf9b8ed4ddb34b9cacee0e2e9921f6f3 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sat, 10 Aug 2013 15:51:35 +0200 Subject: Fix potential issues with import paths --- src/plugin_manager.py | 2 +- src/theming.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugin_manager.py b/src/plugin_manager.py index bb139dad..d691b3b5 100644 --- a/src/plugin_manager.py +++ b/src/plugin_manager.py @@ -60,7 +60,7 @@ except: pass else: if poezio_plugins.__path__: - load_path.append(poezio_plugins.__path__[0]) + load_path.append(list(poezio_plugins.__path__)[0]) if version_info[1] >= 3: # 3.3 & > from importlib import machinery diff --git a/src/theming.py b/src/theming.py index d62b47ae..18115587 100644 --- a/src/theming.py +++ b/src/theming.py @@ -427,7 +427,8 @@ def update_themes_dir(option=None, value=None): except: pass else: - load_path.append(poezio_themes.__path__[0]) + if poezio_themes.__path__: + load_path.append(list(poezio_themes.__path__)[0]) def reload_theme(): theme_name = config.get('theme', 'default') -- cgit v1.2.3