diff mercurial/util.py @ 36551:98d4c642d7f2

py3: fix string slicing in util.parsetimezone()
author Yuya Nishihara <yuya@tcha.org>
date Thu, 01 Mar 2018 18:15:58 -0500
parents 0c2eeaca0577
children f5427483eebe
line wrap: on
line diff
--- a/mercurial/util.py	Thu Mar 01 18:06:25 2018 -0500
+++ b/mercurial/util.py	Thu Mar 01 18:15:58 2018 -0500
@@ -2353,6 +2353,7 @@
 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()