put back IF NOT as currently we always try to create and TB. first we wait for info in ticket. then if needed we ask db to list table and perhaps parse it or find a way to test table is there (rather than everything catching

This commit is contained in:
Nikos Kouremenos 2006-04-10 23:28:53 +00:00
parent 5fcf9dca06
commit 213dcd32bb

View file

@ -41,17 +41,13 @@ def assert_unread_msgs_table_exists():
cur = con.cursor() cur = con.cursor()
cur.executescript( cur.executescript(
''' '''
CREATE TABLE unread_messages ( CREATE TABLE IF NOT EXISTS unread_messages (
message_id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE message_id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE
); );
''' '''
) )
try:
con.commit() con.commit()
gajim.logger.init_vars() gajim.logger.init_vars() # FIXME: is this needed?
except sqlite.OperationalError, e:
pass
con.close()
def create_log_db(): def create_log_db():
print _('creating logs database') print _('creating logs database')