mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Fixed crash if the firmware was in the list, but not found.
CL-541
This commit is contained in:
parent
bc8741ef08
commit
a35f665201
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue