From 9b29bbe324106657b21e2f3ec18d9eb7c6828e45 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 30 Jan 2006 17:23:18 +0000 Subject: [PATCH] prevent TB --- src/common/connection.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index c7f3cd5a3..a6f790540 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -433,8 +433,9 @@ class Connection: if not self.last_history_line.has_key(jid): return self.dispatch('GC_MSG', (frm, msgtxt, tim)) - if self.name not in no_log_for and not\ - int(float(time.mktime(tim))) <= self.last_history_line[jid]: + if self.name not in no_log_for and jid in self.last_history_line \ + and not int(float(time.mktime(tim))) <= \ + self.last_history_line[jid]: gajim.logger.write('gc_msg', frm, msgtxt, tim = tim) elif mtype == 'chat': # it's type 'chat' if not msg.getTag('body') and chatstate is None: #no