[lib/domain] ajout du dossier courant dans le path pour import de librairies dans le dossier du projet
This commit is contained in:
parent
10b1960f4e
commit
5276833afe
|
@ -3,6 +3,7 @@
|
||||||
lib/domain.py The domain-scoped utility functions
|
lib/domain.py The domain-scoped utility functions
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
import importlib
|
import importlib
|
||||||
import logging
|
import logging
|
||||||
from types import ModuleType
|
from types import ModuleType
|
||||||
|
@ -185,6 +186,7 @@ def d_domains(config) -> Dict[str, ModuleType]:
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
sys.path.append('.')
|
||||||
return {
|
return {
|
||||||
domain: importlib.import_module(domain)
|
domain: importlib.import_module(domain)
|
||||||
for domain, _ in config.items('domains')
|
for domain, _ in config.items('domains')
|
||||||
|
|
Loading…
Reference in New Issue