fix traceback when using a non-BOSH proxy. Fixes #5449
This commit is contained in:
parent
ddb493c87d
commit
7eb24c3c53
|
@ -72,7 +72,7 @@ def get_proxy_data_from_dict(proxy):
|
|||
# with proxy!=bosh or with bosh over HTTP proxy we're connecting to proxy
|
||||
# machine
|
||||
tcp_host, tcp_port = proxy['host'], proxy['port']
|
||||
if proxy['useauth']:
|
||||
if proxy.get('useauth', False):
|
||||
proxy_user, proxy_pass = proxy['user'], proxy['pass']
|
||||
return tcp_host, tcp_port, proxy_user, proxy_pass
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ class ProfileWindow:
|
|||
return True # loop forever
|
||||
|
||||
def remove_statusbar(self, message_id):
|
||||
self.statusbar.remove(self.context_id, message_id)
|
||||
self.statusbar.remove_message(self.context_id, message_id)
|
||||
self.remove_statusbar_timeout_id = None
|
||||
|
||||
def on_profile_window_destroy(self, widget):
|
||||
|
@ -246,7 +246,7 @@ class ProfileWindow:
|
|||
self.set_value(i + '_entry', vcard_[i])
|
||||
if self.update_progressbar_timeout_id is not None:
|
||||
if self.message_id:
|
||||
self.statusbar.remove(self.context_id, self.message_id)
|
||||
self.statusbar.remove_message(self.context_id, self.message_id)
|
||||
self.message_id = self.statusbar.push(self.context_id,
|
||||
_('Information received'))
|
||||
self.remove_statusbar_timeout_id = gobject.timeout_add_seconds(3,
|
||||
|
@ -341,7 +341,7 @@ class ProfileWindow:
|
|||
|
||||
def vcard_not_published(self):
|
||||
if self.message_id:
|
||||
self.statusbar.remove(self.context_id, self.message_id)
|
||||
self.statusbar.remove_message(self.context_id, self.message_id)
|
||||
self.message_id = self.statusbar.push(self.context_id,
|
||||
_('Information NOT published'))
|
||||
self.remove_statusbar_timeout_id = gobject.timeout_add_seconds(3,
|
||||
|
|
Loading…
Reference in New Issue