Fix genconfig error

Change-Id: If5f466a076634cf10bd01b81e65adaea04a59306
Closes-Bug: #1713934
This commit is contained in:
wangzhh 2017-08-30 09:36:37 -04:00
parent 9459c05a2f
commit dd5d63e7fa
2 changed files with 3 additions and 1 deletions

View File

@ -56,7 +56,7 @@ class WsgiMiddleware(object):
def setup(binary, host):
if CONF.profiler.enabled:
if profiler_initializer and CONF.profiler.enabled:
profiler_initializer.init_from_conf(
conf=CONF,
context=context.get_admin_context().to_dict(),

View File

@ -22,6 +22,8 @@ def register_opts(conf):
def list_opts():
if not profiler_opts:
return {}
return {
profiler_opts._profiler_opt_group: profiler_opts._PROFILER_OPTS
}