优化-module_config path命令

Signed-off-by: deveco_xdevice <liguangjie1@huawei.com>
This commit is contained in:
deveco_xdevice 2024-01-09 19:40:05 +08:00
parent bbbdb057e9
commit 2188e1b3f3

View File

@ -245,7 +245,8 @@ class DriversThread(threading.Thread):
if self.environment is None:
return
if hasattr(driver_request.config, ConfigConst.module_config):
if hasattr(driver_request.config, ConfigConst.module_config) and \
getattr(driver_request.config, ConfigConst.module_config, None):
module_config_path = getattr(driver_request.config, ConfigConst.module_config, None)
LOG.debug("Common module config path: {}".format(module_config_path))
from xdevice import Variables