From 5a1bef60a03b57de708a1a751bd90b8245fd8b83 Mon Sep 17 00:00:00 2001 From: Zero-1729 Date: Wed, 4 Aug 2021 19:59:06 +0100 Subject: test: refactor: remove binascii from test_framework --- test/functional/test_framework/netutil.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/functional/test_framework/netutil.py') diff --git a/test/functional/test_framework/netutil.py b/test/functional/test_framework/netutil.py index 5dc723c1d5..b5f78e0cf3 100644 --- a/test/functional/test_framework/netutil.py +++ b/test/functional/test_framework/netutil.py @@ -12,7 +12,6 @@ import socket import struct import array import os -from binascii import unhexlify # STATE_ESTABLISHED = '01' # STATE_SYN_SENT = '02' @@ -44,7 +43,7 @@ def _remove_empty(array): def _convert_ip_port(array): host,port = array.split(':') # convert host from mangled-per-four-bytes form as used by kernel - host = unhexlify(host) + host = bytes.fromhex(host) host_out = '' for x in range(0, len(host) // 4): (val,) = struct.unpack('=I', host[x*4:(x+1)*4]) -- cgit v1.2.3