Merge "Fix genconfig error"

This commit is contained in:
Jenkins 2017-08-31 07:14:11 +00:00 committed by Gerrit Code Review
commit 031ca7d764
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
}