mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-03 03:54:01 -06:00
Correcting warning
.. also decoding the type of device and using it for the if clause, too.
This commit is contained in:
parent
a52c62f6bb
commit
0f6c7a9405
1 changed files with 3 additions and 2 deletions
|
@ -191,11 +191,12 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin):
|
||||||
info = zeroconf.get_service_info(service_type, name)
|
info = zeroconf.get_service_info(service_type, name)
|
||||||
|
|
||||||
if info:
|
if info:
|
||||||
if info.properties.get(b"type", None) == b'printer':
|
typeOfDevice = info.properties.get(b"type", None).decode("utf-8")
|
||||||
|
if typeOfDevice == "printer":
|
||||||
address = '.'.join(map(lambda n: str(n), info.address))
|
address = '.'.join(map(lambda n: str(n), info.address))
|
||||||
self.addPrinterSignal.emit(str(name), address, info.properties)
|
self.addPrinterSignal.emit(str(name), address, info.properties)
|
||||||
else:
|
else:
|
||||||
Logger.log("w", "The type of the found device is '%s', not 'printer'! Ignoring.." % name)
|
Logger.log("w", "The type of the found device is '%s', not 'printer'! Ignoring.." %typeOfDevice )
|
||||||
else:
|
else:
|
||||||
Logger.log("w", "Could not get information about %s" % name)
|
Logger.log("w", "Could not get information about %s" % name)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue