mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 15:37:27 -06:00
Prevent crash when starting the firmware update twice
CURA-6Q
This commit is contained in:
parent
09f40c8f77
commit
1a04744679
1 changed files with 6 additions and 2 deletions
|
@ -7,6 +7,8 @@ from enum import IntEnum
|
|||
from threading import Thread
|
||||
from typing import Union
|
||||
|
||||
from UM.Logger import Logger
|
||||
|
||||
MYPY = False
|
||||
if MYPY:
|
||||
from cura.PrinterOutput.PrinterOutputDevice import PrinterOutputDevice
|
||||
|
@ -38,8 +40,10 @@ class FirmwareUpdater(QObject):
|
|||
return
|
||||
|
||||
self._setFirmwareUpdateState(FirmwareUpdateState.updating)
|
||||
|
||||
self._update_firmware_thread.start()
|
||||
try:
|
||||
self._update_firmware_thread.start()
|
||||
except RuntimeError:
|
||||
Logger.warning("Could not start the update thread, since it's still running!")
|
||||
|
||||
def _updateFirmware(self) -> None:
|
||||
raise NotImplementedError("_updateFirmware needs to be implemented")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue