Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/jarabe/web/online_accounts_manager.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/jarabe/web/online_accounts_manager.py')
-rw-r--r--src/jarabe/web/online_accounts_manager.py26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/jarabe/web/online_accounts_manager.py b/src/jarabe/web/online_accounts_manager.py
index cb7a7ce..7cabadf 100644
--- a/src/jarabe/web/online_accounts_manager.py
+++ b/src/jarabe/web/online_accounts_manager.py
@@ -32,17 +32,21 @@ class OnlineAccountsManager(GObject.GObject):
def all_accounts(cls):
accounts = []
- for f in os.listdir(os.path.join(config.ext_path, 'web')):
- if f.endswith('.py') and not f.startswith('__'):
- module_name = f[:-3]
- logging.debug("OnlineAccountsManager loading %s" % \
- (module_name))
- try:
- mod = __import__('web.' + module_name, globals(),
- locals(), [module_name])
- accounts.append(mod.get_account())
- except Exception:
- logging.exception('Exception while loading extension:')
+ web_path = os.path.join(config.ext_path, 'web')
+ for d in os.listdir(web_path):
+ dir_path = os.path.join(web_path, d)
+ if os.path.isdir(dir_path):
+ for f in os.listdir(dir_path):
+ if f.endswith('.py') and not f.startswith('__'):
+ module_name = f[:-3]
+ logging.debug("OnlineAccountsManager loading %s" % \
+ (module_name))
+ try:
+ mod = __import__('web.' + d + '.' + module_name, globals(),
+ locals(), [module_name])
+ accounts.append(mod.get_account())
+ except Exception:
+ logging.exception('Exception while loading extension:')
return accounts
@classmethod