diff --git a/requirements.txt b/requirements.txt index b3dd93a..24f459f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,5 @@ mysqlclient paramiko -sshtunnel \ No newline at end of file +sshtunnel + +git+https://kumig.it/kumisystems/pyadonis.git \ No newline at end of file diff --git a/src/reportmonster/classes/config.py b/src/reportmonster/classes/config.py index e85eea5..6415291 100644 --- a/src/reportmonster/classes/config.py +++ b/src/reportmonster/classes/config.py @@ -35,7 +35,11 @@ class MonsterConfig: try: self.pyadonis = Path(parser["MONSTER"]["PyAdonis"]) except KeyError: - print(f"PyAdonis is not defined in the MONSTER section of {path}, some features may be missing.") + try: + import pyadonis + self.pyadonis = Path(pyadonis.__path__[0]) + except ImportError: + print(f"PyAdonis is not defined in the MONSTER section of {path}, some features may be missing.") def __init__(self, path: Union[str, Path]) -> None: