# HG changeset patch
# User Yuya Nishihara <y...@tcha.org>
# Date 1523169700 -32400
#      Sun Apr 08 15:41:40 2018 +0900
# Node ID 76e926434da64ea97ab0ef540e4a71c6490aee7d
# Parent  d06df110b5f0ac978f800e1ade62c0a4642f08a0
py3: drop b'' from error message of fancyopts

diff --git a/mercurial/fancyopts.py b/mercurial/fancyopts.py
--- a/mercurial/fancyopts.py
+++ b/mercurial/fancyopts.py
@@ -370,8 +370,8 @@ def fancyopts(args, options, state, gnu=
             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
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to