aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/gcode_macro.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-09-04 14:20:24 -0400
committerKevin O'Connor <kevin@koconnor.net>2021-09-16 13:44:54 -0400
commit46167cae672073b1ce0aeb4966b30c28bc47957e (patch)
tree52ea9318147b065b6848970e6821f7260e1f4190 /klippy/extras/gcode_macro.py
parentc89db2480df57204d805f52c9c488e251bafe631 (diff)
downloadkutter-46167cae672073b1ce0aeb4966b30c28bc47957e.tar.gz
kutter-46167cae672073b1ce0aeb4966b30c28bc47957e.tar.xz
kutter-46167cae672073b1ce0aeb4966b30c28bc47957e.zip
configfile: Add support for reporting deprecated options
Add a new printer.configfile.warnings with a list of config features that are deprecated. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/gcode_macro.py')
-rw-r--r--klippy/extras/gcode_macro.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/klippy/extras/gcode_macro.py b/klippy/extras/gcode_macro.py
index 444614e6..fffeed06 100644
--- a/klippy/extras/gcode_macro.py
+++ b/klippy/extras/gcode_macro.py
@@ -141,8 +141,10 @@ class GCodeMacro:
desc=self.cmd_SET_GCODE_VARIABLE_help)
self.in_script = False
prefix = 'default_parameter_'
- self.kwparams = { o[len(prefix):].upper(): config.get(o)
- for o in config.get_prefix_options(prefix) }
+ self.kwparams = {}
+ for option in config.get_prefix_options(prefix):
+ config.deprecate(option)
+ self.kwparams[option[len(prefix):].upper()] = config.get(option)
self.variables = {}
prefix = 'variable_'
for option in config.get_prefix_options(prefix):