Fix config path.
@@ -42,7 +42,6 @@ from st2common.runners.base_action import Action
from st2common.runners.utils import get_logger_for_python_runner_action
from st2common.runners.utils import get_action_class_instance
from st2common.util import loader as action_loader
-from st2common.content.utils import get_pack_base_path
from st2common.constants.action import ACTION_OUTPUT_RESULT_DELIMITER
from st2common.constants.keyvalue import SYSTEM_SCOPE
from st2common.constants.runners import PYTHON_RUNNER_INVALID_ACTION_STATUS_EXIT_CODE
@@ -150,8 +149,11 @@ class PackConfigDict(dict):
try:
value = super(PackConfigDict, self).__getitem__(key)
except KeyError:
- pack_path = get_pack_base_path(pack_name=self._pack_name)
- config_path = os.path.join(pack_path, 'configs/', self._pack_name + '.yaml')
+ # Note: We use late import to avoid performance overhead
+ from oslo_config import cfg
+
+ configs_path = os.path.join(cfg.CONF.system.base_path, 'configs/')
+ config_path = os.path.join(configs_path, self._pack_name + '.yaml')
msg = CONFIG_MISSING_ITEM_ERROR % (self._pack_name, key, config_path)
raise ValueError(msg)
