mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Replace deprecated tostring with tobytes
This commit is contained in:
parent
9196b708b3
commit
00315c85bb
2 changed files with 2 additions and 2 deletions
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue