vppapigen: expose the values of per-message "options" in the api.json files
[vpp.git] / src / vpp-api / vapi / vapi_json_parser.py
index 6d2db42..1383d45 100644 (file)
@@ -164,7 +164,7 @@ class Message(object):
             raise ParseError("While parsing message `%s': could not find all "
                              "common header fields" % name)
         for field in m[1:]:
-            if len(field) == 1 and 'crc' in field:
+            if isinstance(field, dict) and 'crc' in field:
                 self.crc = field['crc']
                 logger.debug("Found CRC `%s'" % self.crc)
                 continue