re-read jids table from DB when another instance of Gajim added a jid in it. Fixes #3349
This commit is contained in:
parent
00c7e7712a
commit
c524ec78f1
|
@ -181,7 +181,13 @@ class Logger:
|
|||
typ = constants.JID_ROOM_TYPE
|
||||
else:
|
||||
typ = constants.JID_NORMAL_TYPE
|
||||
self.cur.execute('INSERT INTO jids (jid, type) VALUES (?, ?)', (jid, typ))
|
||||
try:
|
||||
self.cur.execute('INSERT INTO jids (jid, type) VALUES (?, ?)', (jid,
|
||||
typ))
|
||||
except sqlite.IntegrityError, e:
|
||||
# Jid already in DB, maybe added by another instance. re-read DB
|
||||
self.get_jids_already_in_db()
|
||||
return self.get_jid_id(jid, typestr)
|
||||
try:
|
||||
self.con.commit()
|
||||
except sqlite.OperationalError, e:
|
||||
|
|
Loading…
Reference in New Issue