mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06:00
Added extra status catching for when active machine instance is None
CURA-49
This commit is contained in:
parent
bc8f8473e5
commit
41a07c000d
1 changed files with 5 additions and 1 deletions
|
@ -28,7 +28,11 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin, SignalEmitter):
|
||||||
self._zero_conf.close()
|
self._zero_conf.close()
|
||||||
|
|
||||||
def _onActiveMachineInstanceChanged(self):
|
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:
|
for key in self._printers:
|
||||||
if key == active_machine_key:
|
if key == active_machine_key:
|
||||||
self._printers[key].connect()
|
self._printers[key].connect()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue