remove old FIXME, don't crash when we receive badly encoded char via zeroconf. Fixes #5178
This commit is contained in:
parent
1c7b265c9c
commit
e273fa4ab8
1 changed files with 2 additions and 6 deletions
|
@ -124,11 +124,7 @@ class Zeroconf:
|
||||||
for els in txt_array:
|
for els in txt_array:
|
||||||
key, val = '', None
|
key, val = '', None
|
||||||
for c in els:
|
for c in els:
|
||||||
#FIXME: remove when outdated, this is for avahi < 0.6.14
|
c = chr(c)
|
||||||
if c < 0 or c > 255:
|
|
||||||
c = '.'
|
|
||||||
else:
|
|
||||||
c = chr(c)
|
|
||||||
if val is None:
|
if val is None:
|
||||||
if c == '=':
|
if c == '=':
|
||||||
val = ''
|
val = ''
|
||||||
|
@ -138,7 +134,7 @@ class Zeroconf:
|
||||||
val += c
|
val += c
|
||||||
if val is None: # missing '='
|
if val is None: # missing '='
|
||||||
val = ''
|
val = ''
|
||||||
txt_dict[key] = val.decode('utf-8')
|
txt_dict[key] = val.decode('utf-8', 'ignore')
|
||||||
return txt_dict
|
return txt_dict
|
||||||
|
|
||||||
def service_resolved_callback(self, interface, protocol, name, stype, domain,
|
def service_resolved_callback(self, interface, protocol, name, stype, domain,
|
||||||
|
|
Loading…
Add table
Reference in a new issue