##// END OF EJS Templates
cborutil: remove Python 2 definition of _elementtointeger()...
Gregory Szorc -
r49797:bce8f66d default
parent child Browse files
Show More
@@ -7,7 +7,6 b''
7
7
8
8
9 import struct
9 import struct
10 import sys
11
10
12
11
13 # Very short very of RFC 7049...
12 # Very short very of RFC 7049...
@@ -246,16 +245,8 b' class CBORDecodeError(Exception):'
246 """Represents an error decoding CBOR."""
245 """Represents an error decoding CBOR."""
247
246
248
247
249 if sys.version_info.major >= 3:
248 def _elementtointeger(b, i):
250
249 return b[i]
251 def _elementtointeger(b, i):
252 return b[i]
253
254
255 else:
256
257 def _elementtointeger(b, i):
258 return ord(b[i])
259
250
260
251
261 STRUCT_BIG_UBYTE = struct.Struct('>B')
252 STRUCT_BIG_UBYTE = struct.Struct('>B')
General Comments 0
You need to be logged in to leave comments. Login now