mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-07-11 09:34:09 +01:00
framework/instruments: add ManagedCallback __repr__
Add a __repr__ for ManagedCallback callback to prove a useful representation in logging.
This commit is contained in:
committed by
Marc Bonnici
parent
1101c358d0
commit
fc56de8842
@ -280,6 +280,12 @@ class ManagedCallback(object):
|
|||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
text = 'ManagedCallback({}, {})'
|
||||||
|
return text.format(self.instrument.name, self.callback.im_func.func_name)
|
||||||
|
|
||||||
|
__str__ = __repr__
|
||||||
|
|
||||||
|
|
||||||
# Need this to keep track of callbacks, because the dispatcher only keeps
|
# Need this to keep track of callbacks, because the dispatcher only keeps
|
||||||
# weak references, so if the callbacks aren't referenced elsewhere, they will
|
# weak references, so if the callbacks aren't referenced elsewhere, they will
|
||||||
|
Reference in New Issue
Block a user