Commit aee07594 authored by Yann Leboulanger's avatar Yann Leboulanger

remove old FIXME, don't crash when we receive badly encoded char via zeroconf. Fixes #5178

parent 1a8b94aa
......@@ -115,11 +115,7 @@ class Zeroconf:
for els in txt_array:
key, val = '', None
for c in els:
#FIXME: remove when outdated, this is for avahi < 0.6.14
if c < 0 or c > 255:
c = '.'
else:
c = chr(c)
c = chr(c)
if val is None:
if c == '=':
val = ''
......@@ -129,7 +125,7 @@ class Zeroconf:
val += c
if val is None: # missing '='
val = ''
txt_dict[key] = val.decode('utf-8')
txt_dict[key] = val.decode('utf-8', 'ignore')
return txt_dict
def service_resolved_callback(self, interface, protocol, name, stype, domain, host, aprotocol, address, port, txt, flags):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment