From 0975deb337c03e986718bf2cbbb54377e2e67882 Mon Sep 17 00:00:00 2001 From: Ian Weller Date: Sun, 14 Mar 2010 12:56:04 -0500 Subject: [PATCH] Fix unicode errors on commit --- src/mw/clicommands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mw/clicommands.py b/src/mw/clicommands.py index 92a852c..4b4d3e5 100644 --- a/src/mw/clicommands.py +++ b/src/mw/clicommands.py @@ -221,6 +221,7 @@ class CommitCommand(CommandBase): # FIXME use basetimestamp and starttimestamp filename = os.path.join(self.metadir.root, file) text = codecs.open(filename, 'r', 'utf-8').read() + text = text.encode('utf-8') if text[-1] == '\n': text = text[:-1] md5 = hashlib.md5() @@ -244,7 +245,6 @@ class CommitCommand(CommandBase): 'ids|flags|timestamp|user|comment|content', } response = self.api.call(data)['query']['pages'] - print response self.metadir.pages_add_rv(int(pageid), response[pageid]['revisions'][0]) else: -- 2.39.5