From patchwork Fri Mar 2 00:26:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [10,of,10] py3: fix string slicing in util.parsetimezone() From: Yuya Nishihara X-Patchwork-Id: 28634 Message-Id: <92dac7bbce17a875c89b.1519950389@mimosa> To: mercurial-devel@mercurial-scm.org Date: Thu, 01 Mar 2018 19:26:29 -0500 # HG changeset patch # User Yuya Nishihara # Date 1519946158 18000 # Thu Mar 01 18:15:58 2018 -0500 # Node ID 92dac7bbce17a875c89b9589d1adc14e48e7440e # Parent a7eb4c25e04e5be83918ed160dfff78e782165c1 py3: fix string slicing in util.parsetimezone() diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -2353,6 +2353,7 @@ def shortdate(date=None): def parsetimezone(s): """find a trailing timezone, if any, in string, and return a (offset, remainder) pair""" + s = pycompat.bytestr(s) if s.endswith("GMT") or s.endswith("UTC"): return 0, s[:-3].rstrip()