aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/gcode_macro.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-05-28 10:59:12 -0400
committerKevinOConnor <kevin@koconnor.net>2019-06-04 09:50:30 -0400
commitac8f6dfe20cbd59d6c6f5a187e430e16afaee9a8 (patch)
tree360052f2a908b647f82463700d7b10a57b259337 /klippy/extras/gcode_macro.py
parenta238ec6f98e78af9d398c68b74d73f3254e0cbf3 (diff)
downloadkutter-ac8f6dfe20cbd59d6c6f5a187e430e16afaee9a8.tar.gz
kutter-ac8f6dfe20cbd59d6c6f5a187e430e16afaee9a8.tar.xz
kutter-ac8f6dfe20cbd59d6c6f5a187e430e16afaee9a8.zip
gcode_macro: Rename "status" helper to "printer"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/gcode_macro.py')
-rw-r--r--klippy/extras/gcode_macro.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/klippy/extras/gcode_macro.py b/klippy/extras/gcode_macro.py
index ee28ccbd..57b2153d 100644
--- a/klippy/extras/gcode_macro.py
+++ b/klippy/extras/gcode_macro.py
@@ -11,8 +11,8 @@ import jinja2
# Template handling
######################################################################
-# Wrapper for "status" access to printer object get_status() methods
-class StatusWrapper:
+# Wrapper for access to printer object get_status() methods
+class GetStatusWrapper:
def __init__(self, printer, eventtime=None):
self.printer = printer
self.eventtime = eventtime
@@ -43,10 +43,10 @@ class TemplateWrapper:
logging.exception(msg)
raise printer.config_error(msg)
def create_status_wrapper(self, eventtime=None):
- return StatusWrapper(self.printer, eventtime)
+ return GetStatusWrapper(self.printer, eventtime)
def render(self, context=None):
if context is None:
- context = {'status': self.create_status_wrapper()}
+ context = {'printer': self.create_status_wrapper()}
try:
return str(self.template.render(context))
except Exception as e:
@@ -95,7 +95,7 @@ class GCodeMacro:
"Macro %s called recursively" % (self.alias,))
kwparams = dict(self.kwparams)
kwparams.update(params)
- kwparams['status'] = self.template.create_status_wrapper()
+ kwparams['printer'] = self.template.create_status_wrapper()
kwparams['params'] = params
self.in_script = True
try: