diff --git a/src/common/connection.py b/src/common/connection.py index e4fd50a99..858f5f4fc 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -639,8 +639,8 @@ class Connection: gajim.config.set('usegpg', True) else: gajim.config.set('usegpg', False) - self.dispatch('ACC_OK', (self.name, self.new_account_info)) gajim.connections[self.name] = self + self.dispatch('ACC_OK', (self.name, self.new_account_info)) self.new_account_info = None return self.dispatch('REGISTER_AGENT_INFO', (data[0], data[1].asDict())) diff --git a/src/config.py b/src/config.py index 7da38d8d8..314331f9c 100644 --- a/src/config.py +++ b/src/config.py @@ -1286,7 +1286,10 @@ _('To change the account name, you must be disconnected.')).get_response() _('You must create your account before editing your personal information.')).get_response() return jid = self.xml.get_widget('jid_entry').get_text() - if gajim.connections[self.account].connected < 2: + + # raise the error if account is newly created (not in gajim.connections) + if not gajim.connections.has_key(self.account) or \ + gajim.connections[self.account].connected < 2: dialogs.ErrorDialog(_('You are not connected to the server'), _('Without a connection, you can not edit your personal information.')).get_response() return