forked from platformio/platformio-core
Check for non-ASCII chars mDNS service // Issue #1381
This commit is contained in:
@ -528,6 +528,13 @@ def get_mdns_services():
|
|||||||
with mDNSListener() as mdns:
|
with mDNSListener() as mdns:
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
for service in mdns.get_services():
|
for service in mdns.get_services():
|
||||||
|
properties = None
|
||||||
|
try:
|
||||||
|
assert str(service.properties)
|
||||||
|
properties = service.properties
|
||||||
|
except (AssertionError, UnicodeError):
|
||||||
|
pass
|
||||||
|
|
||||||
items.append({
|
items.append({
|
||||||
"type":
|
"type":
|
||||||
service.type,
|
service.type,
|
||||||
@ -538,7 +545,7 @@ def get_mdns_services():
|
|||||||
"port":
|
"port":
|
||||||
service.port,
|
service.port,
|
||||||
"properties":
|
"properties":
|
||||||
service.properties
|
properties
|
||||||
})
|
})
|
||||||
return items
|
return items
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user