From cc0ddbade5685b81f71e69649337c5aa24e970d2 Mon Sep 17 00:00:00 2001 From: Ken'ichi Ohmichi Date: Tue, 14 Mar 2017 11:29:38 -0700 Subject: [PATCH] Use CONF for oslo_config's cfg.CONF again In most OpenStack projects, the instance of oslo_config's cfg.CONF is declared as CONF. This patch applies it for readability on whole OpenStack components. NOTE: The commit I7758a1ce86de8689fb2c5e420e042fa56c275927 missed a few places and this patch covers them. Sorry for this mess. Change-Id: I1a20ea8b4b7092fd8ed565f8020dbb65c39b9cf1 --- stackalytics/dashboard/web.py | 2 +- stackalytics/processor/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stackalytics/dashboard/web.py b/stackalytics/dashboard/web.py index 8db4c7a94..01b038a87 100644 --- a/stackalytics/dashboard/web.py +++ b/stackalytics/dashboard/web.py @@ -674,7 +674,7 @@ def timeline(records, **kwargs): @app.template_test() def too_old(timestamp): - age = cfg.CONF.age_warn + age = CONF.age_warn now = time.time() return timestamp + age < now diff --git a/stackalytics/processor/utils.py b/stackalytics/processor/utils.py index d725afde5..87729a388 100644 --- a/stackalytics/processor/utils.py +++ b/stackalytics/processor/utils.py @@ -125,7 +125,7 @@ def _session_request(session, uri, method): headers = {'User-Agent': user_agent, 'Accept': 'application/json'} return session.request(method, uri, headers=headers, - timeout=cfg.CONF.read_timeout) + timeout=CONF.read_timeout) def do_request(uri, method='get', session=None):