mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -07:00
Merge pull request #5 from thopiekar/thopiekar-adding-additional-warning-message
Adding debug message when type != 'printer'
This commit is contained in:
commit
037e2571c7
1 changed files with 4 additions and 1 deletions
|
|
@ -191,9 +191,12 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin):
|
|||
info = zeroconf.get_service_info(service_type, name)
|
||||
|
||||
if info:
|
||||
if info.properties.get(b"type", None) == b'printer':
|
||||
type_of_device = info.properties.get(b"type", None).decode("utf-8")
|
||||
if type_of_device == "printer":
|
||||
address = '.'.join(map(lambda n: str(n), info.address))
|
||||
self.addPrinterSignal.emit(str(name), address, info.properties)
|
||||
else:
|
||||
Logger.log("w", "The type of the found device is '%s', not 'printer'! Ignoring.." %type_of_device )
|
||||
else:
|
||||
Logger.log("w", "Could not get information about %s" % name)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue