changeset 48942 | bce8f66d3045 |
parent 48932 | 176f1a0d15dc |
child 48946 | 642e31cb55f0 |
--- a/mercurial/utils/cborutil.py Mon Feb 21 12:42:48 2022 -0700 +++ b/mercurial/utils/cborutil.py Tue Mar 01 20:53:52 2022 -0800 @@ -7,7 +7,6 @@ import struct -import sys # Very short very of RFC 7049... @@ -246,16 +245,8 @@ """Represents an error decoding CBOR.""" -if sys.version_info.major >= 3: - - def _elementtointeger(b, i): - return b[i] - - -else: - - def _elementtointeger(b, i): - return ord(b[i]) +def _elementtointeger(b, i): + return b[i] STRUCT_BIG_UBYTE = struct.Struct('>B')