From 111f923a978ce5bfdd755c03425369c99ef9c277 Mon Sep 17 00:00:00 2001 From: ANISH M <58029804+Anish-M-code@users.noreply.github.com> Date: Sun, 26 Feb 2023 22:04:32 +0530 Subject: [PATCH] Fix array.array object has no attribute tostring() array.tostring() was renamed to array.tobytes() for clarity in python 3.2 and further removed in python 3.9 --- qa/rpc-tests/test_framework/netutil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/rpc-tests/test_framework/netutil.py b/qa/rpc-tests/test_framework/netutil.py index b92a9f6e1..f5c0d5bdd 100644 --- a/qa/rpc-tests/test_framework/netutil.py +++ b/qa/rpc-tests/test_framework/netutil.py @@ -105,7 +105,7 @@ def all_interfaces(): max_possible *= 2 else: break - namestr = names.tostring() + namestr = names.tobytes() return [(namestr[i:i+16].split(b'\0', 1)[0], socket.inet_ntoa(namestr[i+20:i+24])) for i in range(0, outbytes, struct_size)]