macros: fix possible issue when loading macro

apararently according to the log gcode was not defined in a macro, which should not be possible
this handles this cases by not loading the macro and dumping it in the console for debug analysis
This commit is contained in:
alfrix 2023-09-10 18:15:06 -03:00
parent 40365346b4
commit 75ee5c4740

View File

@ -55,6 +55,9 @@ class Panel(ScreenPanel):
return
if "gcode" in section:
gcode = section["gcode"].split("\n")
else:
logging.error(f"gcode not found in {macro}\n{section}")
return
else:
logging.debug(f"Couldn't load {macro}\n{section}")
return