Merge "Move trace ID print statement to finally"

This commit is contained in:
Jenkins
2016-12-23 18:59:06 +00:00
committed by Gerrit Code Review

View File

@@ -769,8 +769,9 @@ class OpenStackCinderShell(object):
if profile: if profile:
osprofiler_profiler.init(options.profile) osprofiler_profiler.init(options.profile)
try:
args.func(self.cs, args) args.func(self.cs, args)
finally:
if profile: if profile:
trace_id = osprofiler_profiler.get().get_base_id() trace_id = osprofiler_profiler.get().get_base_id()
print("Trace ID: %s" % trace_id) print("Trace ID: %s" % trace_id)