# HG changeset patch # User Paul Boddie # Date 1390325077 -3600 # Node ID 000e771c5377a06fbe49aa3695aec8e5e7cebbbc # Parent deac532a14c0304855b170cf85cc801e9b6cadca Changed item reading and writing to use binary mode. diff -r deac532a14c0 -r 000e771c5377 ItemSupport.py --- a/ItemSupport.py Tue Jan 14 16:36:01 2014 +0100 +++ b/ItemSupport.py Tue Jan 21 18:24:37 2014 +0100 @@ -2,7 +2,7 @@ """ MoinMoin - ItemSupport library - @copyright: 2013 by Paul Boddie + @copyright: 2013, 2014 by Paul Boddie @license: GNU GPL (v2 or later), see COPYING.txt for details. """ @@ -190,7 +190,7 @@ "Write the given 'item' to a file with the given 'next' item number." - f = open(self.get_item_path(next), "w") + f = open(self.get_item_path(next), "wb") try: f.write(item) finally: @@ -200,7 +200,7 @@ "Read the item with the given item 'number'." - f = open(self.get_item_path(number)) + f = open(self.get_item_path(number), "rb") try: return f.read() finally: