changeset 37465:39e5e346eba7

py3: drop b'' from error message of fancyopts
author Yuya Nishihara <yuya@tcha.org>
date Sun, 08 Apr 2018 15:41:40 +0900
parents 632b92899203
children abd9f5ec1d82
files mercurial/fancyopts.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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