mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 13:06:05 +08:00
Do not call printer_device.key before checking if it exists
This commit is contained in:
parent
c4a8545c45
commit
cf06cb5351
@ -123,10 +123,11 @@ class DiscoverUM3Action(MachineAction):
|
|||||||
# stored into the metadata of the currently active machine.
|
# stored into the metadata of the currently active machine.
|
||||||
@pyqtSlot(QObject)
|
@pyqtSlot(QObject)
|
||||||
def associateActiveMachineWithPrinterDevice(self, printer_device: Optional["PrinterOutputDevice"]) -> None:
|
def associateActiveMachineWithPrinterDevice(self, printer_device: Optional["PrinterOutputDevice"]) -> None:
|
||||||
Logger.log("d", "Attempting to set the network key of the active machine to %s", printer_device.key)
|
|
||||||
if not printer_device:
|
if not printer_device:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Logger.log("d", "Attempting to set the network key of the active machine to %s", printer_device.key)
|
||||||
|
|
||||||
global_container_stack = CuraApplication.getInstance().getGlobalContainerStack()
|
global_container_stack = CuraApplication.getInstance().getGlobalContainerStack()
|
||||||
if not global_container_stack:
|
if not global_container_stack:
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user