mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 20:09:11 +00:00
framework/instruments: add ManagedCallback __repr__
Add a __repr__ for ManagedCallback callback to prove a useful representation in logging.
This commit is contained in:
parent
1101c358d0
commit
fc56de8842
@ -280,6 +280,12 @@ class ManagedCallback(object):
|
||||
else:
|
||||
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
|
||||
# weak references, so if the callbacks aren't referenced elsewhere, they will
|
||||
|
Loading…
x
Reference in New Issue
Block a user