Skip to content

Commit

Permalink
Python <3.11 compat fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jagerman committed May 4, 2023
1 parent b48e8b2 commit a294c81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/bencode-dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a294c81

Please sign in to comment.