prevent traceback when removing an inexistant session. Fixes #1288

This commit is contained in:
Yann Leboulanger 2008-09-30 10:22:55 +00:00
parent 87edbb8dd8
commit a36edae2f6
1 changed files with 2 additions and 0 deletions

View File

@ -1304,6 +1304,8 @@ class ConnectionHandlersBase:
def delete_session(self, jid, thread_id):
if not jid in self.sessions:
jid = gajim.get_jid_without_resource(jid)
if not jid in self.sessions:
return
del self.sessions[jid][thread_id]