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

put executescript in try block

parent 01f5effc
No related branches found
No related tags found
No related merge requests found
......@@ -39,16 +39,16 @@ def assert_unread_msgs_table_exists():
'''create table unread_messages if there is no such table'''
con = sqlite.connect(logger.LOG_DB_PATH)
cur = con.cursor()
cur.executescript(
'''
CREATE TABLE unread_messages (
message_id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE
);
'''
)
try:
cur.executescript(
'''
CREATE TABLE unread_messages (
message_id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE
);
'''
)
con.commit()
gajim.logger.init_vars() # FIXME: is this needed?
gajim.logger.init_vars()
except sqlite.OperationalError, e:
pass
con.close()
......
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