From 6bba285f8e1485f9f3b9dc7d4e07708d658698e3 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 17 Sep 2020 02:16:29 -0400 Subject: [PATCH] gcode: Don't log debugging output for unknown commands if command is blank Signed-off-by: Kevin O'Connor --- klippy/gcode.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/klippy/gcode.py b/klippy/gcode.py index e15301f9..f34b9ea2 100644 --- a/klippy/gcode.py +++ b/klippy/gcode.py @@ -251,7 +251,9 @@ class GCodeDispatch: raise gcmd.error(self.printer.get_state_message()[0]) return if not cmd: - logging.debug(gcmd.get_commandline()) + cmdline = gcmd.get_commandline() + if cmdline: + logging.debug(cmdline) return if cmd.startswith("M117 "): # Handle M117 gcode with numeric and special characters