convert: print exception message directly
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 26 Jan 2019 16:53:17 -0800
changeset 41440 26761665bdfe
parent 41439 5c73441a47e5
child 41441 b5169e79c31c
convert: print exception message directly Otherwise the default repr() implementation will b'' prefix the returned str on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5729
hgext/convert/convcmd.py
--- a/hgext/convert/convcmd.py	Sat Jan 26 16:45:25 2019 -0800
+++ b/hgext/convert/convcmd.py	Sat Jan 26 16:53:17 2019 -0800
@@ -123,7 +123,7 @@
             exceptions.append(inst)
     if not ui.quiet:
         for inst in exceptions:
-            ui.write("%s\n" % pycompat.bytestr(inst))
+            ui.write("%s\n" % pycompat.bytestr(inst.args[0]))
     raise error.Abort(_('%s: missing or unsupported repository') % path)
 
 def convertsink(ui, path, type):