From ad751dc0cddd5f6cd678a2df00e6ce680df64d19 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 10 Sep 2008 17:59:53 +0000 Subject: [PATCH] prevent traceback when creating account to an unknown host. Fixes #4309 --- src/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/config.py b/src/config.py index ed1479780..98c9ddc6c 100644 --- a/src/config.py +++ b/src/config.py @@ -3174,8 +3174,8 @@ class AccountCreationWizardWindow: self.update_progressbar) # Get form from serveur con = connection.Connection(self.account) - con.new_account(self.account, config) gajim.connections[self.account] = con + con.new_account(self.account, config) elif cur_page == 3: checked = self.xml.get_widget('ssl_checkbutton').get_active() if checked: @@ -3274,6 +3274,8 @@ class AccountCreationWizardWindow: def new_acc_not_connected(self, reason): '''Account creation failed: connection to server failed''' + if self.account not in gajim.connections: + return if self.update_progressbar_timeout_id is not None: gobject.source_remove(self.update_progressbar_timeout_id) del gajim.connections[self.account]