[Florob] Fix logic error resulting in a None type exception.

This commit is contained in:
Stephan Erb 2009-12-13 22:55:57 +01:00
parent a48087aae7
commit 1f954582fb
1 changed files with 3 additions and 3 deletions

View File

@ -1915,9 +1915,9 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream,
# 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)
session_supported = contact_exists and (
contact.supports(common.xmpp.NS_SSN) or
contact.supports(common.xmpp.NS_ESESSION))
if session_supported:
sess.terminate()
del self.sessions[jid][sess.thread_id]