py3: drop b'' from error message of fancyopts
authorYuya Nishihara <yuya@tcha.org>
Sun, 08 Apr 2018 15:41:40 +0900
changeset 37465 39e5e346eba7
parent 37464 632b92899203
child 37466 abd9f5ec1d82
py3: drop b'' from error message of fancyopts
mercurial/fancyopts.py
--- a/mercurial/fancyopts.py	Sat Apr 07 21:26:37 2018 +0900
+++ b/mercurial/fancyopts.py	Sun Apr 08 15:41:40 2018 +0900
@@ -370,8 +370,8 @@
             state[name] = boolval
         else:
             def abort(s):
-                raise error.Abort(
-                    _('invalid value %r for option %s, %s') % (val, opt, s))
+                raise error.Abort(_('invalid value %r for option %s, %s')
+                                  % (pycompat.maybebytestr(val), opt, s))
             state[name] = defmap[name].newstate(state[name], val, abort)
 
     # return unparsed args