From 853d29a0f12cdcb6c406b829a57439c7ea9b570d Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 14 Jul 2011 20:59:01 +0200 Subject: has_key refractored, package name generator by Geek --- module/plugins/AccountManager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/AccountManager.py') 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) -- cgit v1.2.3