From 98e66332eee4928cc331defa803b2aa568bfe9ab Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Sat, 26 Nov 2005 22:02:07 +0000 Subject: [PATCH] restore last lines for correct jid --- scripts/migrate_logs_to_dot9_db.py | 2 +- src/common/logger.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/migrate_logs_to_dot9_db.py b/scripts/migrate_logs_to_dot9_db.py index c9c2cf184..9358ffc71 100755 --- a/scripts/migrate_logs_to_dot9_db.py +++ b/scripts/migrate_logs_to_dot9_db.py @@ -123,7 +123,7 @@ def get_jid(dirname, filename): return jid def decode_jid(string): - '''try to decode (to make it Unicode instance) given jid''' + '''try to decode (to make it Unicode instance) given string''' # by the time we go to iso15 it better be the one else we show bad characters encodings = (sys.getfilesystemencoding(), 'utf-8', 'iso-8859-15') for encoding in encodings: diff --git a/src/common/logger.py b/src/common/logger.py index 012d696b2..8d3083021 100644 --- a/src/common/logger.py +++ b/src/common/logger.py @@ -120,7 +120,7 @@ class Logger: if row is not None: print 'PM!!' return True - else: + else: # FIXME: THIS NEVER HAPPENS? print ' NO PM!!' return False @@ -277,9 +277,9 @@ class Logger: SELECT time, kind, message FROM logs WHERE jid_id = %d AND kind IN (%d, %d, %d, %d) ORDER BY time DESC LIMIT %d OFFSET %d - ''' % (constants.KIND_SINGLE_MSG_RECV, constants.KIND_CHAT_MSG_RECV, + ''' % (jid_id, constants.KIND_SINGLE_MSG_RECV, constants.KIND_CHAT_MSG_RECV, constants.KIND_SINGLE_MSG_SENT, constants.KIND_CHAT_MSG_SENT, - jid_id, restore_how_many_rows, pending_how_many) + restore_how_many_rows, pending_how_many) ) results = cur.fetchall()