mercurial/patch.py
changeset 36229 6ea0b78ddcac
parent 36192 eb91ffdaaece
child 36423 2831d918e1b4
--- a/mercurial/patch.py	Wed Feb 14 16:37:46 2018 +0530
+++ b/mercurial/patch.py	Wed Feb 14 17:43:33 2018 +0530
@@ -1459,7 +1459,7 @@
                 dec.append(util.b85decode(line[1:])[:l])
             except ValueError as e:
                 raise PatchError(_('could not decode "%s" binary patch: %s')
-                                 % (self._fname, str(e)))
+                                 % (self._fname, util.forcebytestr(e)))
             line = getline(lr, self.hunk)
         text = zlib.decompress(''.join(dec))
         if len(text) != size: