aboutsummaryrefslogtreecommitdiff
path: root/metchart
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2024-10-18 21:58:12 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2024-10-18 21:58:12 +0200
commitf544a79a340f2273f686d789e7286a6fdc532d49 (patch)
tree108dbb105a5afa415ff1e23c80bb1eeef904786f /metchart
parentcc9939ea87393cc5b5036fa786d6a9b385971d06 (diff)
downloadmeteo_toolbox-f544a79a340f2273f686d789e7286a6fdc532d49.tar.gz
import using importlib
Diffstat (limited to 'metchart')
-rw-r--r--metchart/manager.py4
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)