diff options
author | Ghostkeeper <rubend@tutanota.com> | 2020-10-30 18:07:31 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2020-10-30 19:45:58 +0300 |
commit | cfccf94914af5c6f5e237504e2f145b8b3157d88 (patch) | |
tree | 437feb78f09fba9623027d77ce25195e5acde18e /plugins/UM3NetworkPrinting | |
parent | ef1952f34c4553712f7c3a299603d8525dccdd45 (diff) |
Don't use deprecated 'address' property of ServiceInfo
It's been replaced by 'addresses'. In the newest Zeroconf version, 'address' has been removed entirely.
Contributes to issue CURA-7501.
Diffstat (limited to 'plugins/UM3NetworkPrinting')
-rw-r--r-- | plugins/UM3NetworkPrinting/src/Network/ZeroConfClient.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/UM3NetworkPrinting/src/Network/ZeroConfClient.py b/plugins/UM3NetworkPrinting/src/Network/ZeroConfClient.py index d59f2f2893..ce5d9ce868 100644 --- a/plugins/UM3NetworkPrinting/src/Network/ZeroConfClient.py +++ b/plugins/UM3NetworkPrinting/src/Network/ZeroConfClient.py @@ -129,20 +129,20 @@ class ZeroConfClient: for record in zero_conf.cache.entries_with_name(info.server): info.update_record(zero_conf, time(), record) - if info.address: + if info.addresses: break # Request more data if info is not complete - if not info.address: + if not info.addresses: 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.addresses: type_of_device = info.properties.get(b"type", None) if type_of_device: if type_of_device == b"printer": - address = '.'.join(map(str, info.address)) + address = '.'.join(map(str, info.addresses[0])) self.addedNetworkCluster.emit(str(name), address, info.properties) else: Logger.log("w", "The type of the found device is '%s', not 'printer'." % type_of_device) |