drop may fail, we still have to create the

table
This commit is contained in:
Dimitur Kirov 2006-04-19 10:47:29 +00:00
parent f4a203d5bc
commit 7f369eb127

View file

@ -241,13 +241,19 @@ class Logger:
results = self.cur.fetchall() results = self.cur.fetchall()
# Remove before 0.10 # Remove before 0.10
except: except:
try:
self.cur.executescript('DROP TABLE unread_messages;') self.cur.executescript('DROP TABLE unread_messages;')
self.con.commit() self.con.commit()
except:
pass
try:
self.cur.executescript('''CREATE TABLE unread_messages( self.cur.executescript('''CREATE TABLE unread_messages(
message_id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, message_id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE,
jid_id INTEGER jid_id INTEGER
);''') );''')
self.con.commit() self.con.commit()
except:
pass
self.con.close() self.con.close()
self.jids_already_in = [] self.jids_already_in = []
self.init_vars() self.init_vars()