py3: replace type 'str' by 'bytes' in templater.py
authorYuya Nishihara <yuya@tcha.org>
Thu, 01 Mar 2018 18:06:25 -0500
changeset 36550 7f6be7121b28
parent 36549 3696efeab66f
child 36551 98d4c642d7f2
py3: replace type 'str' by 'bytes' in templater.py
mercurial/templater.py
--- a/mercurial/templater.py	Thu Mar 01 17:56:32 2018 -0500
+++ b/mercurial/templater.py	Thu Mar 01 18:06:25 2018 -0500
@@ -968,7 +968,7 @@
     if len(args) >= 2:
         tzoffset = None
         tz = evalfuncarg(context, mapping, args[1])
-        if isinstance(tz, str):
+        if isinstance(tz, bytes):
             tzoffset, remainder = util.parsetimezone(tz)
             if remainder:
                 tzoffset = None
@@ -1602,10 +1602,10 @@
 
     if paths is None:
         paths = templatepaths()
-    elif isinstance(paths, str):
+    elif isinstance(paths, bytes):
         paths = [paths]
 
-    if isinstance(styles, str):
+    if isinstance(styles, bytes):
         styles = [styles]
 
     for style in styles: