forked from RIOT-OS/RIOT
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request RIOT-OS/applications#81 from miri64/sniffer/fix/py…
…thon3 sniffer: correct handling of byte strings
- Loading branch information
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]> | ||
|
@@ -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) | ||
|