Fix config import in javascript action module

Before this fix we couldn't individually run a number of unit tests
from IDE because this module was importing configuration from
oslo directly w/o giving a chance to load all needed config options
defined in mistral/config.py

Change-Id: Id538d773e1e3052d6fd7478e1baf5039be4d1a9a
This commit is contained in:
Renat Akhmerov 2016-11-21 15:53:41 +07:00
parent aa8f331349
commit da7798b0f5

View File

@ -15,12 +15,11 @@
import abc import abc
import json import json
from oslo_config import cfg
from oslo_utils import importutils from oslo_utils import importutils
from mistral import config as cfg
from mistral import exceptions as exc from mistral import exceptions as exc
CONF = cfg.CONF
_PYV8 = importutils.try_import('PyV8') _PYV8 = importutils.try_import('PyV8')
_V8EVAL = importutils.try_import('v8eval') _V8EVAL = importutils.try_import('v8eval')
@ -62,7 +61,7 @@ class V8EvalEvaluator(JSEvaluator):
encoding='UTF-8')) encoding='UTF-8'))
EVALUATOR = (V8EvalEvaluator if CONF.js_implementation == 'v8eval' EVALUATOR = (V8EvalEvaluator if cfg.CONF.js_implementation == 'v8eval'
else PyV8Evaluator) else PyV8Evaluator)