From 60a940b98458e1cae3203f5286ec6f652b5f1a56 Mon Sep 17 00:00:00 2001 From: mkaay Date: Mon, 14 Feb 2011 17:41:02 +0100 Subject: gui account add fix --- module/gui/MainWindow.py | 2 +- module/plugins/AccountManager.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'module') 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) -- cgit v1.2.3