mercurial/hgweb/webutil.py
changeset 34807 3caec3c032c8
parent 34403 407ebe7a9b93
child 34855 35c6a54ec1ff
--- a/mercurial/hgweb/webutil.py	Mon Oct 16 22:43:19 2017 -0400
+++ b/mercurial/hgweb/webutil.py	Mon Oct 16 22:44:06 2017 -0400
@@ -30,6 +30,7 @@
     mdiff,
     patch,
     pathutil,
+    pycompat,
     templatefilters,
     ui as uimod,
     util,
@@ -589,7 +590,10 @@
     def __iter__(self):
         separator = self.start
         for key, value in sorted(self.vars.iteritems()):
-            yield {'name': key, 'value': str(value), 'separator': separator}
+            yield {'name': key,
+                   'value': pycompat.bytestr(value),
+                   'separator': separator,
+            }
             separator = '&'
 
 class wsgiui(uimod.ui):