changeset 36550:7f6be7121b28

py3: replace type 'str' by 'bytes' in templater.py
author Yuya Nishihara <yuya@tcha.org>
date Thu, 01 Mar 2018 18:06:25 -0500
parents 3696efeab66f
children 98d4c642d7f2
files mercurial/templater.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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: