Don't crash if address is still none after getting info

This can happen (starting somewhere between zeroconf version 21.0 and 24.0).

Contributes to issue CURA-7032.
This commit is contained in:
Ghostkeeper 2019-12-13 10:54:01 +01:00
parent e54ce8643b
commit 5ea60823f5
No known key found for this signature in database
GPG Key ID: 59A4C0959592C05C

View File

@ -125,7 +125,7 @@ class ZeroConfClient:
if not info.address:
info = zero_conf.get_service_info(service_type, name)
if info:
if info and info.address:
type_of_device = info.properties.get(b"type", None)
if type_of_device:
if type_of_device == b"printer":