Skip to content

Commit

Permalink
Merge pull request RIOT-OS/applications#81 from miri64/sniffer/fix/py…
Browse files Browse the repository at this point in the history
…thon3

sniffer: correct handling of byte strings
  • Loading branch information
miri64 authored and chrysn committed Sep 20, 2022
2 parents 4217c68 + adf8ed1 commit a6a642a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sniffer/tools/sniffer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
(C) 2012, Mariano Alvira <[email protected]>
Expand Down Expand Up @@ -56,10 +56,10 @@
def configure_interface(port, channel):
line = ""
iface = 0
port.write(b'ifconfig\n')
port.write('ifconfig\n'.encode())
while True:
line = port.readline()
if line == '':
if line == b'':
print("Application has no network interface defined",
file=sys.stderr)
sys.exit(2)
Expand Down

0 comments on commit a6a642a

Please sign in to comment.