mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Simplify code
This commit is contained in:
parent
b73a71746e
commit
09742f0cf5
1 changed files with 7 additions and 7 deletions
|
@ -218,16 +218,16 @@ class GlobalStack(CuraContainerStack):
|
||||||
if machine_has_heated_bed:
|
if machine_has_heated_bed:
|
||||||
hex_file = self.getMetaDataEntry("firmware_hbk_file", hex_file)
|
hex_file = self.getMetaDataEntry("firmware_hbk_file", hex_file)
|
||||||
|
|
||||||
if hex_file:
|
if not hex_file:
|
||||||
try:
|
|
||||||
return Resources.getPath(cura.CuraApplication.CuraApplication.ResourceTypes.Firmware, hex_file.format(baudrate=baudrate))
|
|
||||||
except FileNotFoundError:
|
|
||||||
Logger.log("w", "Firmware file %s not found.", hex_file)
|
|
||||||
return ""
|
|
||||||
else:
|
|
||||||
Logger.log("w", "There is no firmware for machine %s.", self.getBottom().id)
|
Logger.log("w", "There is no firmware for machine %s.", self.getBottom().id)
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
try:
|
||||||
|
return Resources.getPath(cura.CuraApplication.CuraApplication.ResourceTypes.Firmware, hex_file.format(baudrate=baudrate))
|
||||||
|
except FileNotFoundError:
|
||||||
|
Logger.log("w", "Firmware file %s not found.", hex_file)
|
||||||
|
return ""
|
||||||
|
|
||||||
## private:
|
## private:
|
||||||
global_stack_mime = MimeType(
|
global_stack_mime = MimeType(
|
||||||
name = "application/x-cura-globalstack",
|
name = "application/x-cura-globalstack",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue