mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Add documentation
CURA-2035
This commit is contained in:
parent
0816663e16
commit
bd6e36f487
1 changed files with 2 additions and 0 deletions
|
@ -81,6 +81,7 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin):
|
|||
if state_change == ServiceStateChange.Added:
|
||||
Logger.log("d", "Bonjour service added: %s" % name)
|
||||
|
||||
# First try getting info from zeroconf cache
|
||||
info = ServiceInfo(service_type, name, properties = {})
|
||||
for record in zeroconf.cache.entries_with_name(name.lower()):
|
||||
info.update_record(zeroconf, time.time(), record)
|
||||
|
@ -90,6 +91,7 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin):
|
|||
if info.address:
|
||||
break
|
||||
|
||||
# Request more data if info is not complete
|
||||
if not info.address:
|
||||
Logger.log("d", "Trying to get address of %s", name)
|
||||
info = zeroconf.get_service_info(service_type, name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue