Skip to content

Commit

Permalink
Replace deprecated tostring with tobytes
Browse files Browse the repository at this point in the history
  • Loading branch information
dongcarl committed Nov 15, 2018
1 parent 9196b70 commit 00315c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,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)]
Expand Down
2 changes: 1 addition & 1 deletion test/functional/test_framework/netutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,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)]
Expand Down

0 comments on commit 00315c8

Please sign in to comment.