comparison mercurial/pure/base85.py @ 36191:80301c90a2dc

py3: converts bytes to pycompat.bytestr to get bytechrs while enumerating Differential Revision: https://phab.mercurial-scm.org/D2270
author Pulkit Goyal <7895pulkit@gmail.com>
date Wed, 14 Feb 2018 17:44:19 +0530
parents 01b4d88ccb24
children 2372284d9457
comparison
equal deleted inserted replaced
36190:7fda2a8ed24e 36191:80301c90a2dc
51 51
52 l = len(text) 52 l = len(text)
53 out = [] 53 out = []
54 for i in range(0, len(text), 5): 54 for i in range(0, len(text), 5):
55 chunk = text[i:i + 5] 55 chunk = text[i:i + 5]
56 chunk = pycompat.bytestr(chunk)
56 acc = 0 57 acc = 0
57 for j, c in enumerate(chunk): 58 for j, c in enumerate(chunk):
58 try: 59 try:
59 acc = acc * 85 + _b85dec[c] 60 acc = acc * 85 + _b85dec[c]
60 except KeyError: 61 except KeyError: