mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 04:59:00 +08:00
Fixed crash if the firmware was in the list, but not found.
CL-541
This commit is contained in:
parent
bc8741ef08
commit
a35f665201
@ -135,7 +135,11 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin, Extension):
|
|||||||
Logger.log("w", "There is no firmware for machine %s.", machine_id)
|
Logger.log("w", "There is no firmware for machine %s.", machine_id)
|
||||||
|
|
||||||
if hex_file:
|
if hex_file:
|
||||||
return Resources.getPath(CuraApplication.ResourceTypes.Firmware, hex_file.format(baudrate=baudrate))
|
try:
|
||||||
|
return Resources.getPath(CuraApplication.ResourceTypes.Firmware, hex_file.format(baudrate=baudrate))
|
||||||
|
except FileNotFoundError:
|
||||||
|
Logger.log("w", "Could not find any firmware for machine %s.", machine_id)
|
||||||
|
return ""
|
||||||
else:
|
else:
|
||||||
Logger.log("w", "Could not find any firmware for machine %s.", machine_id)
|
Logger.log("w", "Could not find any firmware for machine %s.", machine_id)
|
||||||
return ""
|
return ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user