mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 22:55:54 +08:00
Added extra status catching for when active machine instance is None
CURA-49
This commit is contained in:
parent
bc8f8473e5
commit
41a07c000d
@ -28,7 +28,11 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin, SignalEmitter):
|
|||||||
self._zero_conf.close()
|
self._zero_conf.close()
|
||||||
|
|
||||||
def _onActiveMachineInstanceChanged(self):
|
def _onActiveMachineInstanceChanged(self):
|
||||||
|
try:
|
||||||
active_machine_key = Application.getInstance().getMachineManager().getActiveMachineInstance().getKey()
|
active_machine_key = Application.getInstance().getMachineManager().getActiveMachineInstance().getKey()
|
||||||
|
except AttributeError:
|
||||||
|
## Active machine instance changed to None. This can happen upon clean start. Simply ignore.
|
||||||
|
return
|
||||||
for key in self._printers:
|
for key in self._printers:
|
||||||
if key == active_machine_key:
|
if key == active_machine_key:
|
||||||
self._printers[key].connect()
|
self._printers[key].connect()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user