Skip to content
Snippets Groups Projects
Commit 7f369eb1 authored by dkirov's avatar dkirov
Browse files

drop may fail, we still have to create the

table
parent f4a203d5
No related branches found
No related tags found
No related merge requests found
...@@ -241,13 +241,19 @@ class Logger: ...@@ -241,13 +241,19 @@ class Logger:
results = self.cur.fetchall() results = self.cur.fetchall()
# Remove before 0.10 # Remove before 0.10
except: except:
self.cur.executescript('DROP TABLE unread_messages;') try:
self.con.commit() self.cur.executescript('DROP TABLE unread_messages;')
self.cur.executescript('''CREATE TABLE unread_messages( self.con.commit()
message_id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, except:
jid_id INTEGER pass
);''') try:
self.con.commit() self.cur.executescript('''CREATE TABLE unread_messages(
message_id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE,
jid_id INTEGER
);''')
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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment