From a52c62f6bb3b82b51cb5f54a66a12af38899e82a Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Wed, 16 Nov 2016 21:45:25 +0100 Subject: [PATCH] Adding debug message when type != 'printer' Just for the case we lose a device at this point. --- NetworkPrinterOutputDevicePlugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NetworkPrinterOutputDevicePlugin.py b/NetworkPrinterOutputDevicePlugin.py index bb1fade0bc..666c398382 100644 --- a/NetworkPrinterOutputDevicePlugin.py +++ b/NetworkPrinterOutputDevicePlugin.py @@ -194,6 +194,8 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin): if info.properties.get(b"type", None) == b'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.." % name) else: Logger.log("w", "Could not get information about %s" % name)