hgext/convert/common.py
changeset 34022 d5b2beca16c0
parent 30659 1404146157d9
child 34369 5adbd3806ef7
--- a/hgext/convert/common.py	Wed Aug 30 14:04:55 2017 -0700
+++ b/hgext/convert/common.py	Tue Aug 22 20:03:07 2017 -0400
@@ -15,6 +15,7 @@
 
 from mercurial.i18n import _
 from mercurial import (
+    encoding,
     error,
     phases,
     util,
@@ -475,8 +476,9 @@
             try:
                 self.fp = open(self.path, 'a')
             except IOError as err:
-                raise error.Abort(_('could not open map file %r: %s') %
-                                 (self.path, err.strerror))
+                raise error.Abort(
+                    _('could not open map file %r: %s') %
+                    (self.path, encoding.strtolocal(err.strerror)))
         self.fp.write('%s %s\n' % (key, value))
         self.fp.flush()
         super(mapfile, self).__setitem__(key, value)