diff hgext/convert/cvsps.py @ 45681:a736ab681b78

errors: stop passing non-strings to Abort's constructor The next patch will change `Abort`'s constructor and `__bytes__` functions and they will start assuming that the first argument is the messages as `bytes`. Differential Revision: https://phab.mercurial-scm.org/D9178
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 08 Oct 2020 15:35:44 -0700
parents be8552f25cab
children 89a2afe31e82
line wrap: on
line diff
--- a/hgext/convert/cvsps.py	Tue Oct 06 21:06:18 2020 -0700
+++ b/hgext/convert/cvsps.py	Thu Oct 08 15:35:44 2020 -0700
@@ -559,7 +559,7 @@
                     pass  # try next encoding
                 except LookupError as inst:  # unknown encoding, maybe
                     raise error.Abort(
-                        inst,
+                        pycompat.bytestr(inst),
                         hint=_(
                             b'check convert.cvsps.logencoding configuration'
                         ),