Show
Ignore:
Timestamp:
08/30/07 00:20:41 (15 months ago)
Author:
roidelapluie
Message:

re-read jids table from DB when another instance of Gajim added a jid in it. Fixes #3349

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/gajim_0.11.1/src/common/logger.py

    r8595 r8610  
    178178                else: 
    179179                        typ = constants.JID_NORMAL_TYPE 
    180                 self.cur.execute('INSERT INTO jids (jid, type) VALUES (?, ?)', (jid, typ)) 
     180                try: 
     181                        self.cur.execute('INSERT INTO jids (jid, type) VALUES (?, ?)', (jid, 
     182                                typ)) 
     183                except sqlite.IntegrityError, e: 
     184                        # Jid already in DB, maybe added by another instance. re-read DB 
     185                        self.get_jids_already_in_db() 
     186                        return self.get_jid_id(jid, typestr) 
    181187                try: 
    182188                        self.con.commit()