From 5276833afe956e1c5469c2504b56a5fcfda60129 Mon Sep 17 00:00:00 2001 From: "Maxime Alves LIRMM@home" Date: Sat, 24 Apr 2021 23:54:18 +0200 Subject: [PATCH] [lib/domain] ajout du dossier courant dans le path pour import de librairies dans le dossier du projet --- halfapi/lib/domain.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/halfapi/lib/domain.py b/halfapi/lib/domain.py index ee0d917..610b3c3 100644 --- a/halfapi/lib/domain.py +++ b/halfapi/lib/domain.py @@ -3,6 +3,7 @@ lib/domain.py The domain-scoped utility functions """ +import sys import importlib import logging from types import ModuleType @@ -185,6 +186,7 @@ def d_domains(config) -> Dict[str, ModuleType]: return {} try: + sys.path.append('.') return { domain: importlib.import_module(domain) for domain, _ in config.items('domains')