diff options
author | stickell <l.stickell@yahoo.it> | 2014-09-12 18:07:43 +0200 |
---|---|---|
committer | stickell <l.stickell@yahoo.it> | 2014-09-12 18:07:43 +0200 |
commit | 55d2833950101984185203615068dd5fe694f6f7 (patch) | |
tree | 68b2131dc76cd54498e0cd744a99c178f3e63f55 /module/plugins | |
parent | Setup is now able to detect PIllow as well (diff) | |
download | pyload-55d2833950101984185203615068dd5fe694f6f7.tar.xz |
[AccountManager] Fixed #733
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/AccountManager.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/module/plugins/AccountManager.py b/module/plugins/AccountManager.py index b20a5e3b3..9bbf8bfd0 100644 --- a/module/plugins/AccountManager.py +++ b/module/plugins/AccountManager.py @@ -52,7 +52,10 @@ class AccountManager: """get account instance for plugin or None if anonymous""" if plugin in self.accounts: if plugin not in self.plugins: - self.plugins[plugin] = self.core.pluginManager.loadClass("accounts", plugin)(self, self.accounts[plugin]) + try: + self.plugins[plugin] = self.core.pluginManager.loadClass("accounts", plugin)(self, self.accounts[plugin]) + except TypeError: # The account class no longer exists (blacklisted plugin). Skipping the account to avoid crash + return None return self.plugins[plugin] else: @@ -172,7 +175,10 @@ class AccountManager: for p in self.accounts.keys(): if self.accounts[p]: p = self.getAccountPlugin(p) - data[p.__name__] = p.getAllAccounts(force) + if p: + data[p.__name__] = p.getAllAccounts(force) + else: # When an account has been skipped, p is None + data[p] = [] else: data[p] = [] e = AccountUpdateEvent() |