Merge "Move trace ID print statement to finally"
This commit is contained in:
@@ -769,13 +769,14 @@ class OpenStackCinderShell(object):
|
|||||||
if profile:
|
if profile:
|
||||||
osprofiler_profiler.init(options.profile)
|
osprofiler_profiler.init(options.profile)
|
||||||
|
|
||||||
args.func(self.cs, args)
|
try:
|
||||||
|
args.func(self.cs, args)
|
||||||
if profile:
|
finally:
|
||||||
trace_id = osprofiler_profiler.get().get_base_id()
|
if profile:
|
||||||
print("Trace ID: %s" % trace_id)
|
trace_id = osprofiler_profiler.get().get_base_id()
|
||||||
print("To display trace use next command:\n"
|
print("Trace ID: %s" % trace_id)
|
||||||
"osprofiler trace show --html %s " % trace_id)
|
print("To display trace use next command:\n"
|
||||||
|
"osprofiler trace show --html %s " % trace_id)
|
||||||
|
|
||||||
def _run_extension_hooks(self, hook_type, *args, **kwargs):
|
def _run_extension_hooks(self, hook_type, *args, **kwargs):
|
||||||
"""Runs hooks for all registered extensions."""
|
"""Runs hooks for all registered extensions."""
|
||||||
|
Reference in New Issue
Block a user