mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 10:35:56 +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()
|
||||
|
||||
def _onActiveMachineInstanceChanged(self):
|
||||
active_machine_key = Application.getInstance().getMachineManager().getActiveMachineInstance().getKey()
|
||||
try:
|
||||
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:
|
||||
if key == active_machine_key:
|
||||
self._printers[key].connect()
|
||||
|
Loading…
x
Reference in New Issue
Block a user