py3 decode order
This commit is contained in:
parent
d9fc52bf48
commit
22973d7036
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue