diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2024-10-18 21:58:12 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2024-10-18 21:58:12 +0200 |
commit | f544a79a340f2273f686d789e7286a6fdc532d49 (patch) | |
tree | 108dbb105a5afa415ff1e23c80bb1eeef904786f /metchart/manager.py | |
parent | cc9939ea87393cc5b5036fa786d6a9b385971d06 (diff) | |
download | meteo_toolbox-f544a79a340f2273f686d789e7286a6fdc532d49.tar.gz |
import using importlib
Diffstat (limited to 'metchart/manager.py')
-rw-r--r-- | metchart/manager.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/metchart/manager.py b/metchart/manager.py index 36cfaa9..a49b75e 100644 --- a/metchart/manager.py +++ b/metchart/manager.py @@ -4,6 +4,8 @@ import yaml import json import os +import importlib + from multiprocessing import cpu_count from multiprocessing.pool import ThreadPool @@ -59,7 +61,7 @@ class Manager: classname = cfg['module'] del cfg['module'] - module = __import__(classname, fromlist=[None]) + module = importlib.import_module(classname) then(key if not anonymous else None, module, cfg) |