From 5fcf9dca0656f94d1d355be07009c0356cd24b6d Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Mon, 10 Apr 2006 23:18:28 +0000 Subject: [PATCH] fix um again; fix coding standrads (crazy tabbing, bad spacing before comma) --- src/common/check_paths.py | 16 ++++++++-------- src/common/logger.py | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/common/check_paths.py b/src/common/check_paths.py index 6c38711ba..cb21e11bc 100644 --- a/src/common/check_paths.py +++ b/src/common/check_paths.py @@ -35,17 +35,17 @@ Q_ = i18n.Q_ from pysqlite2 import dbapi2 as sqlite # DO NOT MOVE ABOVE OF import gajim -def assert_um_exists(): +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 - ); - ''' - ) + ''' + CREATE TABLE unread_messages ( + message_id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE + ); + ''' + ) try: con.commit() gajim.logger.init_vars() @@ -128,7 +128,7 @@ def check_and_possibly_create_paths(): print _('Gajim will now exit') sys.exit() else: - assert_um_exists() + assert_unread_msgs_table_exists() else: # dot_gajim doesn't exist if dot_gajim: # is '' on win9x so avoid that diff --git a/src/common/logger.py b/src/common/logger.py index c467acd12..f03553667 100644 --- a/src/common/logger.py +++ b/src/common/logger.py @@ -235,7 +235,7 @@ class Logger: jid = jid.lower() jid_id = self.get_jid_id(jid) self.cur.execute(''' - SELECT message_id, message, time, subject FROM logs , unread_messages + SELECT message_id, message, time, subject FROM logs, unread_messages WHERE jid_id = %d AND log_line_id = message_id ORDER BY time ASC ''' % (jid_id) )