Check profiler instance before initialize
Add a small check for this to an prevent issue in Nova [1] that causes some commands not working. [1] http://paste.openstack.org/show/641262/ Change-Id: I685386695e13bf5034a1008dbdcff4539eb482d2 Closes-Bug: #1743586
This commit is contained in:
parent
6647bf2ae3
commit
79e4e2de42
|
@ -55,8 +55,9 @@ def init(hmac_key, base_id=None, parent_id=None):
|
|||
:param parent_id: Used to build tree of traces.
|
||||
:returns: Profiler instance
|
||||
"""
|
||||
__local_ctx.profiler = _Profiler(hmac_key, base_id=base_id,
|
||||
parent_id=parent_id)
|
||||
if get() is None:
|
||||
__local_ctx.profiler = _Profiler(hmac_key, base_id=base_id,
|
||||
parent_id=parent_id)
|
||||
return __local_ctx.profiler
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue