diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py index 0f33e44a1e..c09305df59 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py @@ -47,6 +47,7 @@ class CloudOutputDeviceManager: self._update_timer.setInterval(int(self.CHECK_CLUSTER_INTERVAL * 1000)) self._update_timer.setSingleShot(False) + # Ensure we don't start twice. self._running = False ## Starts running the cloud output device manager, thus periodically requesting cloud data. @@ -55,7 +56,7 @@ class CloudOutputDeviceManager: return self._account.loginStateChanged.connect(self._onLoginStateChanged) self._update_timer.timeout.connect(self._getRemoteClusters) - self._onLoginStateChanged(is_logged_in = self._account.isLoggedIn) + self._onLoginStateChanged(is_logged_in=self._account.isLoggedIn) ## Stops running the cloud output device manager. def stop(self): @@ -63,7 +64,7 @@ class CloudOutputDeviceManager: return self._account.loginStateChanged.disconnect(self._onLoginStateChanged) self._update_timer.timeout.disconnect(self._getRemoteClusters) - self._onLoginStateChanged(is_logged_in = False) + self._onLoginStateChanged(is_logged_in=False) ## Force refreshing connections. def refreshConnections(self) -> None: diff --git a/plugins/UM3NetworkPrinting/src/Network/NetworkOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Network/NetworkOutputDeviceManager.py index 9f33439f18..0633f8e0bc 100644 --- a/plugins/UM3NetworkPrinting/src/Network/NetworkOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Network/NetworkOutputDeviceManager.py @@ -42,13 +42,14 @@ class NetworkOutputDeviceManager: self._discovered_devices = {} # type: Dict[str, NetworkOutputDevice] self._output_device_manager = CuraApplication.getInstance().getOutputDeviceManager() - # TODO: move zeroconf stuff to own class + # TODO: move zeroconf stuff to own class? self._zero_conf = None # type: Optional[Zeroconf] self._zero_conf_browser = None # type: Optional[ServiceBrowser] self._service_changed_request_queue = None # type: Optional[Queue] self._service_changed_request_event = None # type: Optional[Event] self._service_changed_request_thread = None # type: Optional[Thread] + # TODO: move manual device stuff to own class? # Persistent dict containing manually connected clusters. self._manual_instances = {} # type: Dict[str, ManualPrinterRequest] self._last_manual_entry_key = None # type: Optional[str]