summaryrefslogtreecommitdiffstats
path: root/module/AccountManager.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-12 19:42:46 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-12 19:42:46 +0200
commite655d860882fff63160098f063fc3e4c9b8c0ba5 (patch)
treee05cbf8628841a64952d294663bd263c19d2bbcd /module/AccountManager.py
parentmerge (diff)
downloadpyload-e655d860882fff63160098f063fc3e4c9b8c0ba5.tar.xz
web if acc settings
Diffstat (limited to 'module/AccountManager.py')
-rw-r--r--module/AccountManager.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/module/AccountManager.py b/module/AccountManager.py
index 0122b0223..fc122e760 100644
--- a/module/AccountManager.py
+++ b/module/AccountManager.py
@@ -51,7 +51,14 @@ class AccountManager():
else:
return None
-
+ def getAccountPlugins(self):
+ """ get all account instances"""
+
+ plugins = []
+ for plugin in self.accounts.keys():
+ plugins.append(self.getAccountPlugin(plugin))
+
+ return plugins
#----------------------------------------------------------------------
def loadAccounts(self):
"""loads all accounts available"""
@@ -107,7 +114,7 @@ class AccountManager():
f = open("accounts.conf", "wb")
f.write("version: " + str(ACC_VERSION) + "\n")
-
+
for plugin, accounts in self.accounts.iteritems():
f.write("\n")
f.write(plugin+":\n")
@@ -145,11 +152,12 @@ class AccountManager():
#----------------------------------------------------------------------
def removeAccount(self, plugin, user):
"""remove account"""
+
if self.accounts.has_key(plugin):
p = self.getAccountPlugin(plugin)
p.removeAccount(user)
- if self.accounts.has_key(user):
- del self.accounts[user]
+ if self.accounts[plugin].has_key(user):
+ del self.accounts[plugin][user]
self.saveAccounts()