hgext/convert/common.py
changeset 36170 42a393ea56d2
parent 35187 671aba341d90
child 36186 0f9e52f900c4
--- a/hgext/convert/common.py	Mon Feb 12 22:29:36 2018 -0500
+++ b/hgext/convert/common.py	Mon Feb 12 23:50:58 2018 -0500
@@ -447,7 +447,7 @@
         if not self.path:
             return
         try:
-            fp = open(self.path, 'r')
+            fp = open(self.path, 'rb')
         except IOError as err:
             if err.errno != errno.ENOENT:
                 raise
@@ -471,7 +471,7 @@
     def __setitem__(self, key, value):
         if self.fp is None:
             try:
-                self.fp = open(self.path, 'a')
+                self.fp = open(self.path, 'ab')
             except IOError as err:
                 raise error.Abort(
                     _('could not open map file %r: %s') %