klippy: Allow extras modules to be directories
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
af1cd3c4ce
commit
2622b439fc
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue