Skip to content

Commit

Permalink
ui: replaced deprecated tostring() by tobytes()
Browse files Browse the repository at this point in the history
> Deprecated since version 3.2, will be removed in version 3.9.

And they did!

https://docs.python.org/3.9/library/array.html#array.array.tobytes
  • Loading branch information
gustavo-iniguez-goya committed Nov 28, 2020
1 parent df952d9 commit f9d9af9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/opensnitch/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def _setup_interfaces(self):
0x8912, # SIOCGIFCONF
struct.pack('iL', bytes, names.buffer_info()[0])
))[0]
namestr = names.tostring()
namestr = names.tobytes()
self._interfaces = {}
for i in range(0, outbytes, 40):
name = namestr[i:i+16].split(b'\0', 1)[0]
Expand Down

0 comments on commit f9d9af9

Please # to comment.