Skip to content
Snippets Groups Projects
Unverified Commit 22973d70 authored by Dashie's avatar Dashie
Browse files

py3 decode order

parent d9fc52bf
No related branches found
No related tags found
No related merge requests found
...@@ -59,10 +59,9 @@ class AprsISConnection(aprslib.IS): ...@@ -59,10 +59,9 @@ class AprsISConnection(aprslib.IS):
""" """
def filterCallback(line): def filterCallback(line):
try: try:
# py3: this seems to somehow break the packets ? # decode first then replace
# line = line.replace('\x00', '')
# just do a decode to do str->bytes
line = line.decode() line = line.decode()
line = line.replace('\x00', '')
except UnicodeError as e: except UnicodeError as e:
# string is not UTF-8 # string is not UTF-8
return return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment