summaryrefslogtreecommitdiffstats
path: root/module/plugins/AccountManager.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-14 20:59:01 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-14 20:59:01 +0200
commit853d29a0f12cdcb6c406b829a57439c7ea9b570d (patch)
tree047d94a11037617521c7a50130a6ead538c5daf7 /module/plugins/AccountManager.py
parentfixed config on webif + show description (diff)
downloadpyload-853d29a0f12cdcb6c406b829a57439c7ea9b570d.tar.xz
has_key refractored, package name generator by Geek
Diffstat (limited to 'module/plugins/AccountManager.py')
-rw-r--r--module/plugins/AccountManager.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/module/plugins/AccountManager.py b/module/plugins/AccountManager.py
index 94af7cd82..4b218d8f8 100644
--- a/module/plugins/AccountManager.py
+++ b/module/plugins/AccountManager.py
@@ -49,8 +49,8 @@ class AccountManager():
#----------------------------------------------------------------------
def getAccountPlugin(self, plugin):
"""get account instance for plugin or None if anonymous"""
- if self.accounts.has_key(plugin):
- if not self.plugins.has_key(plugin):
+ if plugin in self.accounts:
+ if plugin not in self.plugins:
self.plugins[plugin] = self.core.pluginManager.getAccountPlugin(plugin)(self, self.accounts[plugin])
return self.plugins[plugin]
@@ -143,7 +143,7 @@ class AccountManager():
@lock
def updateAccount(self, plugin , user, password=None, options={}):
"""add or update account"""
- if self.accounts.has_key(plugin):
+ if plugin in self.accounts:
p = self.getAccountPlugin(plugin)
updated = p.updateAccounts(user, password, options)
#since accounts is a ref in plugin self.accounts doesnt need to be updated here
@@ -155,7 +155,7 @@ class AccountManager():
def removeAccount(self, plugin, user):
"""remove account"""
- if self.accounts.has_key(plugin):
+ if plugin in self.accounts:
p = self.getAccountPlugin(plugin)
p.removeAccount(user)