prevent a TB when a jid is in mem but not in DB (is has been removed while gajim was running) fixes #3073

This commit is contained in:
Yann Leboulanger 2007-06-05 13:13:20 +00:00
parent 2beba33a4a
commit 3ba415dfea
1 changed files with 15 additions and 13 deletions

View File

@ -169,8 +169,10 @@ class Logger:
jid = jid.split('/', 1)[0] # remove the resource jid = jid.split('/', 1)[0] # remove the resource
if jid in self.jids_already_in: # we already have jids in DB if jid in self.jids_already_in: # we already have jids in DB
self.cur.execute('SELECT jid_id FROM jids WHERE jid=?', [jid]) self.cur.execute('SELECT jid_id FROM jids WHERE jid=?', [jid])
jid_id = self.cur.fetchone()[0] row = self.cur.fetchone()
else: # oh! a new jid :), we add it now if row:
return row[0]
# oh! a new jid :), we add it now
if typestr == 'ROOM': if typestr == 'ROOM':
typ = constants.JID_ROOM_TYPE typ = constants.JID_ROOM_TYPE
else: else: