Fix typing

This commit is contained in:
Lipu Fei 2019-12-17 10:26:43 +01:00
parent ed838baafa
commit 3ddc2466f8

View file

@ -123,7 +123,9 @@ class ZeroConfClient:
# Request more data if info is not complete # Request more data if info is not complete
if not info.address: if not info.address:
info = zero_conf.get_service_info(service_type, name) new_info = zero_conf.get_service_info(service_type, name)
if new_info is not None:
info = new_info
if info and info.address: if info and info.address:
type_of_device = info.properties.get(b"type", None) type_of_device = info.properties.get(b"type", None)