Python <3.11 compat fix

This commit is contained in:
Jason Rhinelander 2023-05-03 21:12:19 -03:00
parent b48e8b23ea
commit a294c81f0d
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262

View File

@ -30,7 +30,7 @@ def next_byte():
if is_hex:
pair = f.read(2)
assert pair is not None and len(pair) == 2
b = int(pair, 16).to_bytes()
b = int(pair, 16).to_bytes(1, 'big')
else:
b = f.read(1)
assert b is not None and len(b) == 1