Mercurial > hg
changeset 41257:d08c816a11d3
shallowutil: slice off a byte instead of subscripting
This behaves identically on Python 2 and 3.
Differential Revision: https://phab.mercurial-scm.org/D5607
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 16 Jan 2019 11:01:45 -0500 |
parents | ebda5d4265ec |
children | a6b98c95bcf0 |
files | hgext/remotefilelog/shallowutil.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/remotefilelog/shallowutil.py Wed Jan 16 11:01:16 2019 -0500 +++ b/hgext/remotefilelog/shallowutil.py Wed Jan 16 11:01:45 2019 -0500 @@ -121,7 +121,7 @@ offset = 0 buflen = len(metabuf) while buflen - offset >= 3: - key = metabuf[offset] + key = metabuf[offset:offset + 1] offset += 1 metalen = struct.unpack_from('!H', metabuf, offset)[0] offset += 2