summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2011-02-14 17:41:02 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2011-02-14 17:41:02 +0100
commit60a940b98458e1cae3203f5286ec6f652b5f1a56 (patch)
treefc475fe9ecdc69d2938fa4a14c27dbf1bfd3462b
parentreally fixed #201 (diff)
downloadpyload-60a940b98458e1cae3203f5286ec6f652b5f1a56.tar.xz
gui account add fix
-rw-r--r--module/gui/MainWindow.py2
-rw-r--r--module/plugins/AccountManager.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/module/gui/MainWindow.py b/module/gui/MainWindow.py
index 51476f114..46f7e54a3 100644
--- a/module/gui/MainWindow.py
+++ b/module/gui/MainWindow.py
@@ -648,7 +648,7 @@ class MainWindow(QMainWindow):
self.emit(SIGNAL("refreshStatus"), pid)
def slotNewAccount(self):
- types = self.connector.proxy.get_accounts(False, False).keys()
+ types = self.connector.proxy.getAccountTypes()
self.accountEdit = AccountEdit.newAccount(types)
def save(data):
diff --git a/module/plugins/AccountManager.py b/module/plugins/AccountManager.py
index bd0871705..7299ff643 100644
--- a/module/plugins/AccountManager.py
+++ b/module/plugins/AccountManager.py
@@ -124,8 +124,9 @@ class AccountManager():
for name,data in accounts.iteritems():
f.write("\n\t%s:%s\n" % (name,data["password"]) )
- for option, values in data["options"].iteritems():
- f.write("\t@%s %s\n" % (option, " ".join(values)))
+ if data["options"]:
+ for option, values in data["options"].iteritems():
+ f.write("\t@%s %s\n" % (option, " ".join(values)))
f.close()
chmod(f.name, 0600)