summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/python
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api/python')
-rw-r--r--src/vpp-api/python/vpp_papi/vpp_serializer.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vpp-api/python/vpp_papi/vpp_serializer.py b/src/vpp-api/python/vpp_papi/vpp_serializer.py
index c01b2d3bd8b..5b45cd8a569 100644
--- a/src/vpp-api/python/vpp_papi/vpp_serializer.py
+++ b/src/vpp-api/python/vpp_papi/vpp_serializer.py
@@ -188,8 +188,12 @@ class FixedList_u8(object):
' expected: {}'
.format(self.name, len(data), self.num))
- return self.packer.pack(data)
-
+ try:
+ return self.packer.pack(data)
+ except struct.error:
+ raise VPPSerializerValueError(
+ 'Packing failed for "{}" {}'
+ .format(self.name, kwargs))
def unpack(self, data, offset=0, result=None, ntc=False):
if len(data[offset:]) < self.num:
raise VPPSerializerValueError(