From 8ec6f1e7d682a56c122f930febb28da1575b8ff8 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Thu, 13 Jul 2017 20:09:10 +0800 Subject: decouple the mutual-dependence of config.py and server.py Currently server.py relies on CONF while starting the service, and config.py's config_fie is set in server.py, which is wrongly bi-depended this patch aims to let Config parse the sys.argv personally, just as oslo.config do, so that decouple the mutual-dependency Change-Id: I46887d122a98d478caebe9eeb7ab038941ce1f6b Signed-off-by: SerenaFeng --- testapi/opnfv_testapi/router/url_mappings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'testapi/opnfv_testapi/router') diff --git a/testapi/opnfv_testapi/router/url_mappings.py b/testapi/opnfv_testapi/router/url_mappings.py index 37e719b..562fa5e 100644 --- a/testapi/opnfv_testapi/router/url_mappings.py +++ b/testapi/opnfv_testapi/router/url_mappings.py @@ -8,7 +8,7 @@ ############################################################################## import tornado.web -from opnfv_testapi.common import config +from opnfv_testapi.common.config import CONF from opnfv_testapi.resources import handlers from opnfv_testapi.resources import pod_handlers from opnfv_testapi.resources import project_handlers @@ -58,7 +58,7 @@ mappings = [ # static path (r'/(.*\.(css|png|gif|js|html|json|map|woff2|woff|ttf))', tornado.web.StaticFileHandler, - {'path': config.Config().static_path}), + {'path': CONF.static_path}), (r'/', root.RootHandler), (r'/api/v1/auth/signin', sign.SigninHandler), -- cgit 1.2.3-korg