aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-06-19 22:19:02 -0400
committerNeale Ranns <nranns@cisco.com>2019-06-20 07:29:06 +0000
commit48664591c4453d9256355ab91df0f1a097c2fd36 (patch)
treec2ade2f31014b28a58ca67b682f3bbe3036acd92
parent9dd9434fb7002fd608c90d572f9ccd8ffe5224a9 (diff)
misc: papi - add __repr__ to FuncWrapper
Eases troubleshooting. Changes: <FuncWrapper object at 0x7fa7402de790> to <FuncWrapper(func=<want_ip6_ra_events(u16 _vl_msg_id, u32 client_index, u32 context, u8 enable_disable, u32 pid)>)> Type: refactor Change-Id: I3a893090e024a63a0b3b0de51cb3bb2d2a1678c5 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
-rw-r--r--src/vpp-api/python/vpp_papi/vpp_papi.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vpp-api/python/vpp_papi/vpp_papi.py b/src/vpp-api/python/vpp_papi/vpp_papi.py
index 5d35b029d45..5207bbf0bb4 100644
--- a/src/vpp-api/python/vpp_papi/vpp_papi.py
+++ b/src/vpp-api/python/vpp_papi/vpp_papi.py
@@ -104,6 +104,9 @@ class FuncWrapper(object):
def __call__(self, **kwargs):
return self._func(**kwargs)
+ def __repr__(self):
+ return '<FuncWrapper(func=<%s(%s)>)>' % (self.__name__, self.__doc__)
+
class VPPApiError(Exception):
pass