mercurial/templater.py
changeset 32974 8779d35c168d
parent 32970 11c0bb4ccc76
child 33016 4e6dc34b5d7a
--- a/mercurial/templater.py	Wed Jun 21 02:13:34 2017 +0530
+++ b/mercurial/templater.py	Wed Jun 21 02:20:34 2017 +0530
@@ -1106,7 +1106,7 @@
     elif thing is None:
         pass
     elif not util.safehasattr(thing, '__iter__'):
-        yield str(thing)
+        yield pycompat.bytestr(thing)
     else:
         for i in thing:
             i = templatekw.unwraphybrid(i)
@@ -1115,7 +1115,7 @@
             elif i is None:
                 pass
             elif not util.safehasattr(i, '__iter__'):
-                yield str(i)
+                yield pycompat.bytestr(i)
             else:
                 for j in _flatten(i):
                     yield j