From eabc5e6ebc27e694f0197c8a6f8735fb73949d0f Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Fri, 26 Aug 2005 14:44:46 +0000 Subject: [PATCH] prevent a TB and add FIXMEs for Yann --- src/common/gajim.py | 5 ++++- src/gajim.py | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/common/gajim.py b/src/common/gajim.py index eb09d75ef..4a7c72c9d 100644 --- a/src/common/gajim.py +++ b/src/common/gajim.py @@ -150,7 +150,10 @@ def get_number_of_accounts(): def get_transport_name_from_jid(jid, use_config_setting = True): '''returns 'aim', 'gg', 'irc' etc''' - if use_config_setting and not config.get('use_transports_iconsets'): + #FIXME: jid can be None! one TB I saw had this problem: + # in the code block # it is a groupchat presence in handle_event_notify + # jid was None. Yann why? + if not jid or (use_config_setting and not config.get('use_transports_iconsets')): return host = jid.split('@')[-1] if host.startswith('aim'): diff --git a/src/gajim.py b/src/gajim.py index 153039a3f..4688134cf 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -341,9 +341,10 @@ class Interface: self.remote.raise_signal('ContactAbsence', (account, array)) # stop non active file transfers - elif self.windows[account]['gc'].has_key(ji): + elif self.windows[account]['gc'].has_key(ji): # ji is then room_jid #it is a groupchat presence - #TODO: upgrade the chat instances (for pm) + #FIXME: upgrade the chat instances (for pm) + #FIXME: real_jid can be None self.windows[account]['gc'][ji].chg_contact_status(ji, resource, array[1], array[2], array[6], array[7], array[8], array[9], array[10], array[11], array[12], account)