mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
add dynamic themes and preview
This commit is contained in:
@@ -6,8 +6,10 @@ import modules.errors as errors
|
||||
def load_module(path):
|
||||
module_spec = importlib.util.spec_from_file_location(os.path.basename(path), path)
|
||||
module = importlib.util.module_from_spec(module_spec)
|
||||
module_spec.loader.exec_module(module)
|
||||
|
||||
try:
|
||||
module_spec.loader.exec_module(module)
|
||||
except Exception as e:
|
||||
errors.display(e, f'Module load: {path}')
|
||||
return module
|
||||
|
||||
|
||||
@@ -26,4 +28,4 @@ def preload_extensions(extensions_dir, parser):
|
||||
module.preload(parser)
|
||||
|
||||
except Exception as e:
|
||||
errors.display(e, f'extension preload: {preload_script}')
|
||||
errors.display(e, f'Extension preload: {preload_script}')
|
||||
|
||||
Reference in New Issue
Block a user