From 75ee5c474066fc10c2385389fd6b051aa5cf8ff0 Mon Sep 17 00:00:00 2001 From: alfrix Date: Sun, 10 Sep 2023 18:15:06 -0300 Subject: [PATCH] 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 --- panels/gcode_macros.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/panels/gcode_macros.py b/panels/gcode_macros.py index 5f7c7b7f..0615025b 100644 --- a/panels/gcode_macros.py +++ b/panels/gcode_macros.py @@ -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