From f544a79a340f2273f686d789e7286a6fdc532d49 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Fri, 18 Oct 2024 21:58:12 +0200 Subject: import using importlib --- metchart/manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'metchart/manager.py') 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) -- cgit v1.2.3