From 704bfc3a2a4b00f01462f196dcdc25bc940d9bff Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 31 Mar 2005 12:17:07 +0000 Subject: [PATCH] bugfix if we create a new account self.account is not set --- plugins/gtkgui/config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/gtkgui/config.py b/plugins/gtkgui/config.py index c09ab87b8..a6235ecab 100644 --- a/plugins/gtkgui/config.py +++ b/plugins/gtkgui/config.py @@ -1049,9 +1049,10 @@ class Account_modification_window: priority = self.xml.get_widget('priority_spinbutton').get_value_as_int() new_account_checkbutton = self.xml.get_widget('new_account_checkbutton') name = self.xml.get_widget('name_entry').get_text() - if name != self.account and self.plugin.connected[self.account] != 0: - Error_dialog(_('You must be offline to change the account\'s name')) - return + if self.plugin.connected.has_key(self.account): + if name != self.account and self.plugin.connected[self.account] != 0: + Error_dialog(_('You must be offline to change the account\'s name')) + return jid = self.xml.get_widget('jid_entry').get_text() autoconnect = 0 if self.xml.get_widget('autoconnect_checkbutton').get_active():