tests: Replace usage of tostring() with tobytes()
tostring() is deprecated as of python 3.7 and results in stderr output causing tests to fail
This commit is contained in:
1 parent
ddc3ec92b0
commit
8845c8aea6
1 file changed
+1
-1
@@ -107,7 +107,7 @@ def all_interfaces():
|
|||||||
max_possible *= 2
|
max_possible *= 2
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
namestr = names.tostring()
|
namestr = names.tobytes()
|
||||||
return [(namestr[i:i+16].split(b'\0', 1)[0],
|
return [(namestr[i:i+16].split(b'\0', 1)[0],
|
||||||
socket.inet_ntoa(namestr[i+20:i+24]))
|
socket.inet_ntoa(namestr[i+20:i+24]))
|
||||||
for i in range(0, outbytes, struct_size)]
|
for i in range(0, outbytes, struct_size)]
|
||||||
|
|||||||
Reference in new issue
Block a user