papi: vla list of fixed strings
[vpp.git] / src / vpp-api / python / vpp_papi / vpp_serializer.py
index d7da457..d846139 100644 (file)
@@ -304,9 +304,8 @@ class VLAList(Packer):
                     len(lst), kwargs[self.length_field]
                 )
             )
-
         # u8 array
-        if self.packer.size == 1:
+        if self.packer.size == 1 and self.field_type == "u8":
             if isinstance(lst, list):
                 return b"".join(lst)
             return bytes(lst)
@@ -321,7 +320,7 @@ class VLAList(Packer):
         total = 0
 
         # u8 array
-        if self.packer.size == 1:
+        if self.packer.size == 1 and self.field_type == "u8":
             if result[self.index] == 0:
                 return b"", 0
             p = BaseTypes("u8", result[self.index])
@@ -618,7 +617,6 @@ class VPPType(Packer):
 
                 self.packers.append(p)
                 size += p.size
-
         self.size = size
         self.tuple = collections.namedtuple(name, self.fields, rename=True)
         types[name] = self