diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-06-27 13:01:48 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-06-27 13:01:48 -0400 |
commit | 2622b439fc9e9c5b93daf1a49dc3ed34bd9f85eb (patch) | |
tree | 8d9479be7a19cf0a7a763b97d3f6d593e508e5aa /klippy/klippy.py | |
parent | af1cd3c4ce36f43bdd9d45201b906d2c9e89a971 (diff) | |
download | kutter-2622b439fc9e9c5b93daf1a49dc3ed34bd9f85eb.tar.gz kutter-2622b439fc9e9c5b93daf1a49dc3ed34bd9f85eb.tar.xz kutter-2622b439fc9e9c5b93daf1a49dc3ed34bd9f85eb.zip |
klippy: Allow extras modules to be directories
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/klippy.py')
-rw-r--r-- | klippy/klippy.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/klippy/klippy.py b/klippy/klippy.py index e7588349..588666f6 100644 --- a/klippy/klippy.py +++ b/klippy/klippy.py @@ -189,7 +189,9 @@ class Printer: module_name = module_parts[0] py_name = os.path.join(os.path.dirname(__file__), 'extras', module_name + '.py') - if not os.path.exists(py_name): + py_dirname = os.path.join(os.path.dirname(__file__), + 'extras', module_name, '__init__.py') + if not os.path.exists(py_name) and not os.path.exists(py_dirname): return None mod = importlib.import_module('extras.' + module_name) init_func = 'load_config' |