changeset 36126:8f5c7f906f9b

ui: use pycompat.bytestr() to get a bytes-repr of config default We don't know what type we'll get here, so we need something that'll behave like a repr without returning a unicode. Differential Revision: https://phab.mercurial-scm.org/D2208
author Augie Fackler <augie@google.com>
date Mon, 12 Feb 2018 20:41:47 -0500
parents 0dde5f53b4ce
children df1760b58fda
files mercurial/ui.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/ui.py	Mon Feb 12 20:39:48 2018 -0500
+++ b/mercurial/ui.py	Mon Feb 12 20:41:47 2018 -0500
@@ -498,7 +498,7 @@
               and default != itemdefault):
             msg = ("specifying a mismatched default value for a registered "
                    "config item: '%s.%s' '%s'")
-            msg %= (section, name, default)
+            msg %= (section, name, pycompat.bytestr(default))
             self.develwarn(msg, 2, 'warn-config-default')
 
         for s, n in alternates: