aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/klippy.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-03-07 14:41:09 -0500
committerKevin O'Connor <kevin@koconnor.net>2018-03-11 00:04:30 -0500
commitb549c3927e292a33188b46d22fc67ab48b6b790a (patch)
treeb92d890584d1301d0e0be6649d492ad67565b3ae /klippy/klippy.py
parente53a589ac3c54ef9ece8d2fb897494938295e085 (diff)
downloadkutter-b549c3927e292a33188b46d22fc67ab48b6b790a.tar.gz
kutter-b549c3927e292a33188b46d22fc67ab48b6b790a.tar.xz
kutter-b549c3927e292a33188b46d22fc67ab48b6b790a.zip
klippy: Allow external callers of try_load_module()
It can be useful to automatically pull in a module in the extras/ directory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/klippy.py')
-rw-r--r--klippy/klippy.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/klippy/klippy.py b/klippy/klippy.py
index 90370f6d..b28099ce 100644
--- a/klippy/klippy.py
+++ b/klippy/klippy.py
@@ -178,7 +178,7 @@ class Printer:
logging.info("Stats %.1f: %s", eventtime,
' '.join([s[1] for s in stats]))
return eventtime + 1.
- def _try_load_module(self, config, section):
+ def try_load_module(self, config, section):
if section in self.objects:
return
module_parts = section.split()
@@ -208,7 +208,7 @@ class Printer:
for m in [pins, mcu]:
m.add_printer_objects(self, config)
for section in fileconfig.sections():
- self._try_load_module(config, section)
+ self.try_load_module(config, section)
for m in [chipmisc, toolhead, extruder, heater]:
m.add_printer_objects(self, config)
# Validate that there are no undefined parameters in the config file