gcode_macro: Disallow whitespace in macro name (#4312)
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
This commit is contained in:
parent
bd42d497ae
commit
ba3bbca861
|
@ -113,6 +113,10 @@ def load_config(config):
|
|||
|
||||
class GCodeMacro:
|
||||
def __init__(self, config):
|
||||
if len(config.get_name().split()) > 2:
|
||||
raise config.error(
|
||||
"Name of section '%s' contains illegal whitespace"
|
||||
% (config.get_name()))
|
||||
name = config.get_name().split()[1]
|
||||
self.alias = name.upper()
|
||||
self.printer = printer = config.get_printer()
|
||||
|
|
Loading…
Reference in New Issue