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()