From aa25e739c68f22343faaece02ecc40db8819c543 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 25 Nov 2005 18:02:41 +0000 Subject: [PATCH] decode string and not lists --- scripts/migrate_logs_to_dot9_db.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/migrate_logs_to_dot9_db.py b/scripts/migrate_logs_to_dot9_db.py index 4bc756ac2..16f5062eb 100755 --- a/scripts/migrate_logs_to_dot9_db.py +++ b/scripts/migrate_logs_to_dot9_db.py @@ -149,9 +149,6 @@ def visit(arg, dirname, filenames): # sent ==> chat_msg_sent, status ==> status type = splitted_line[1] # line[1] has type of logged message message_data = splitted_line[2:] # line[2:] has message data - message_data = decode_string(message_data) - if not message_data: - continue # line[0] is date, # some lines can be fucked up, just drop them @@ -185,6 +182,9 @@ def visit(arg, dirname, filenames): show = message_data[0] message = ':'.join(message_data[1:]) # status msg + message = decode_string(message) + if not message: + continue values = (JID_ID, contact_name, tim, kind, show, message) cur.execute(sql, values) con.commit()