From 10be9e66748bb8aa3628313f5b9606fad12dd0e9 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 3 Aug 2016 17:04:50 +0200 Subject: [PATCH] Fix an warning when a printer has a timeout before it has been fully discovered CURA-1851 --- NetworkPrinterOutputDevicePlugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NetworkPrinterOutputDevicePlugin.py b/NetworkPrinterOutputDevicePlugin.py index a36f7ea9eb..8db0c4a783 100644 --- a/NetworkPrinterOutputDevicePlugin.py +++ b/NetworkPrinterOutputDevicePlugin.py @@ -68,6 +68,8 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin): ## Handler for when the connection state of one of the detected printers changes def _onPrinterConnectionStateChanged(self, key): + if key not in self._printers: + return if self._printers[key].isConnected(): self.getOutputDeviceManager().addOutputDevice(self._printers[key]) else: