From a36edae2f69eadbefd70b3379c069df337c6e4b4 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 30 Sep 2008 10:22:55 +0000 Subject: [PATCH] prevent traceback when removing an inexistant session. Fixes #1288 --- src/common/connection_handlers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index c6b4a9903..0d1f6f1a9 100644 --- a/src/common/connection_handlers.py +++ b/src/common/connection_handlers.py @@ -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]