diff mercurial/revlog.py @ 36725:f659a407e5ee

py3: use util.forcebytestr instead of str to convert error messages Differential Revision: https://phab.mercurial-scm.org/D2649
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 04 Mar 2018 22:37:41 +0530
parents f574cc00831a
children 981f328d6d16
line wrap: on
line diff
--- a/mercurial/revlog.py	Sat Mar 03 23:49:39 2018 -0500
+++ b/mercurial/revlog.py	Sun Mar 04 22:37:41 2018 +0530
@@ -1996,7 +1996,8 @@
             try:
                 return _zlibdecompress(data)
             except zlib.error as e:
-                raise RevlogError(_('revlog decompress error: %s') % str(e))
+                raise RevlogError(_('revlog decompress error: %s') %
+                                  util.forcebytestr(e))
         # '\0' is more common than 'u' so it goes first.
         elif t == '\0':
             return data