Patchwork D1135: webutil: use pycompat.bytestr() instead of str()

login
register
mail settings
Submitter phabricator
Date Oct. 17, 2017, 12:40 p.m.
Message ID <2c913df738fa96db5f41a5aa07645c88@localhost.localdomain>
Download mbox | patch
Permalink /patch/25095/
State Not Applicable
Headers show

Comments

phabricator - Oct. 17, 2017, 12:40 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG3caec3c032c8: webutil: use pycompat.bytestr() instead of str() (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1135?vs=2885&id=2909

REVISION DETAIL
  https://phab.mercurial-scm.org/D1135

AFFECTED FILES
  mercurial/hgweb/webutil.py

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit, ryanmce
Cc: ryanmce, mercurial-devel

Patch

diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webutil.py
+++ b/mercurial/hgweb/webutil.py
@@ -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):