From b549c3927e292a33188b46d22fc67ab48b6b790a Mon Sep 17 00:00:00 2001
From: Kevin O'Connor <kevin@koconnor.net>
Date: Wed, 7 Mar 2018 14:41:09 -0500
Subject: [PATCH] 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>
---
 klippy/klippy.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/klippy/klippy.py b/klippy/klippy.py
index 90370f6d5..b28099ce5 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