mercurial/verify.py
branchstable
changeset 46696 ed0899e01628
parent 44113 e77b57e09bfa
child 46790 5137896602d9
--- a/mercurial/verify.py	Thu Mar 11 19:50:14 2021 -0500
+++ b/mercurial/verify.py	Thu Mar 11 21:02:03 2021 -0500
@@ -14,6 +14,9 @@
     nullid,
     short,
 )
+from .utils import (
+    stringutil,
+)
 
 from . import (
     error,
@@ -81,7 +84,7 @@
 
     def _exc(self, linkrev, msg, inst, filename=None):
         """record exception raised during the verify process"""
-        fmsg = pycompat.bytestr(inst)
+        fmsg = stringutil.forcebytestr(inst)
         if not fmsg:
             fmsg = pycompat.byterepr(inst)
         self._err(linkrev, b"%s: %s" % (msg, fmsg), filename)