changeset 809a9f9de21a in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=809a9f9de21a description: fix some tracebacks when adding / removing a contact. Fixes #5946
diffstat:
src/common/connection_handlers.py | 5 +++-- src/common/connection_handlers_events.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r 410bd743ad79 -r 809a9f9de21a src/common/connection_handlers.py --- a/src/common/connection_handlers.py Tue Sep 28 15:21:34 2010 +0200 +++ b/src/common/connection_handlers.py Tue Sep 28 15:51:26 2010 +0200 @@ -1773,7 +1773,8 @@ break
if obj.contact: - obj.old_show = statuss.index(obj.contact.show) + if obj.contact.show in statuss: + obj.old_show = statuss.index(obj.contact.show) # nick changed if obj.contact_nickname is not None and \ obj.contact.contact_name != obj.contact_nickname: @@ -1800,7 +1801,7 @@ resource=obj.resource) gajim.contacts.add_contact(account, obj.contact) obj.contact_list.append(obj.contact) - else: + elif obj.contact.show in statuss: obj.old_show = statuss.index(obj.contact.show) if (resources != [''] and (len(obj.contact_list) != 1 or \ obj.contact_list[0].show != 'offline')) and \ diff -r 410bd743ad79 -r 809a9f9de21a src/common/connection_handlers_events.py --- a/src/common/connection_handlers_events.py Tue Sep 28 15:21:34 2010 +0200 +++ b/src/common/connection_handlers_events.py Tue Sep 28 15:51:26 2010 +0200 @@ -772,7 +772,7 @@ gajim.config.set_per('account', self.conn.name, 'dont_ack_subscription', True) else: - self.dispatch('UNSUBSCRIBED', self.jid) + self.conn.dispatch('UNSUBSCRIBED', self.jid) elif self.ptype == 'error': errmsg = self.iq_obj.getError() errcode = self.iq_obj.getErrorCode()