changeset f20b43f02db2 in /home/hg/repos/gajim

details:http://hg.gajim.org/gajim?cmd=changeset;node=f20b43f02db2
description: Work around a reported NoneType exception.

diffstat:

 src/common/connection_handlers.py |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r bfd6d6631c0a -r f20b43f02db2 src/common/connection_handlers.py
--- a/src/common/connection_handlers.py Mon Nov 09 21:51:43 2009 +0100
+++ b/src/common/connection_handlers.py Mon Nov 09 22:03:14 2009 +0100
@@ -2468,8 +2468,12 @@
                                for sess in self.sessions[jid].values():
                                        if not sess.received_thread_id:
                                                contact = 
gajim.contacts.get_contact(self.name, jid)
-
-                                               session_supported = 
contact.supports(common.xmpp.NS_SSN) or \
+                                               # FIXME: I don't know if this 
is the correct behavior here.
+                                               # Anyway, it is the old 
behavior when we assumed that
+                                               # not-existing contacts don't 
support anything
+                                               contact_exists = bool(contact)
+                                               session_supported = 
contact_exists and \
+                                                       
contact.supports(common.xmpp.NS_SSN) or \
                                                        
contact.supports(common.xmpp.NS_ESESSION)
                                                if session_supported:
                                                        sess.terminate()
_______________________________________________
Commits mailing list
[email protected]
http://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to