From a294c81f0d609b1ddba7189a3b599fc0f1ec7b7b Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Wed, 3 May 2023 21:12:19 -0300 Subject: [PATCH] Python <3.11 compat fix --- contrib/bencode-dump.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/bencode-dump.py b/contrib/bencode-dump.py index 63e191ccb..479fc1cfc 100755 --- a/contrib/bencode-dump.py +++ b/contrib/bencode-dump.py @@ -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