From patchwork Fri Mar 2 00:26:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [09,of,10] py3: replace type 'str' by 'bytes' in templater.py From: Yuya Nishihara X-Patchwork-Id: 28633 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Thu, 01 Mar 2018 19:26:28 -0500 # HG changeset patch # User Yuya Nishihara # Date 1519945585 18000 # Thu Mar 01 18:06:25 2018 -0500 # Node ID a7eb4c25e04e5be83918ed160dfff78e782165c1 # Parent 42239a898f18efa768297ab43b016793726834cd py3: replace type 'str' by 'bytes' in templater.py diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -968,7 +968,7 @@ def localdate(context, mapping, args): 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 @@ def stylemap(styles, paths=None): 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: