From 45e8b692f0767722cedf4bd0b279e3f1bc03bdc7 Mon Sep 17 00:00:00 2001 From: BryantHe Date: Thu, 27 Jul 2023 16:01:14 +0800 Subject: [PATCH] debug --- namekoplus/command.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/namekoplus/command.py b/namekoplus/command.py index f27204e..1832bae 100644 --- a/namekoplus/command.py +++ b/namekoplus/command.py @@ -1,3 +1,4 @@ +import importlib import inspect import os import shutil @@ -321,7 +322,7 @@ def metric_config_gen(module, class_name_str): # Extract information of statsd config from the class of nameko service dest_dir = module.split('.')[0] file_name = module.split('.')[-1] - _module = __import__(module) + _module = importlib.import_module(module) config_list = [] for class_name in class_name_str.split(','): members = inspect.getmembers(getattr(getattr(_module, file_name), class_name), predicate=inspect.isfunction)