mercurial/encoding.py
changeset 45681 a736ab681b78
parent 44452 9d2b2df2c2ba
child 45942 89a2afe31e82
--- a/mercurial/encoding.py	Tue Oct 06 21:06:18 2020 -0700
+++ b/mercurial/encoding.py	Thu Oct 08 15:35:44 2020 -0700
@@ -207,7 +207,9 @@
                 # can't round-trip
                 return u.encode(_sysstr(encoding), "replace")
     except LookupError as k:
-        raise error.Abort(k, hint=b"please check your locale settings")
+        raise error.Abort(
+            pycompat.bytestr(k), hint=b"please check your locale settings"
+        )
 
 
 def fromlocal(s):