From 086ae1c73513dcb9ac089fdce795c89dc428ef0e Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 8 Apr 2019 12:25:52 +0200 Subject: [PATCH] Make sure the unsuccessful manual device gets removed CURA-6057 --- plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py b/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py index a6bc13f3c2..8d923d3827 100644 --- a/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py +++ b/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py @@ -286,7 +286,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin): self.refreshConnections() - def _checkManualDevice(self, address): + def _checkManualDevice(self, address: str) -> None: # Check if a UM3 family device exists at this address. # If a printer responds, it will replace the preliminary printer created above # origin=manual is for tracking back the origin of the call @@ -307,7 +307,8 @@ class UM3OutputDevicePlugin(OutputDevicePlugin): # - Something went wrong with checking the amount of printers the cluster has! # - Couldn't find printer at the address when trying to add it manually. if address in self._manual_instances: - self.removeManualDeviceSignal.emit(self.getPluginId(), "", address) + key = "manual:" + address + self.removeManualDevice(key, address) return if "system" in reply_url: