##// END OF EJS Templates
help: convert flag default to bytes portably...
Augie Fackler -
r32619:d110fb58 default
parent child Browse files
Show More
@@ -84,7 +84,11 b' def optrst(header, options, verbose):'
84 so = '-' + shortopt
84 so = '-' + shortopt
85 lo = '--' + longopt
85 lo = '--' + longopt
86 if default:
86 if default:
87 desc += _(" (default: %s)") % default
87 # default is of unknown type, and in Python 2 we abused
88 # the %s-shows-repr property to handle integers etc. To
89 # match that behavior on Python 3, we do str(default) and
90 # then convert it to bytes.
91 desc += _(" (default: %s)") % pycompat.bytestr(default)
88
92
89 if isinstance(default, list):
93 if isinstance(default, list):
90 lo += " %s [+]" % optlabel
94 lo += " %s [+]" % optlabel
General Comments 0
You need to be logged in to leave comments. Login now