Also fix the vapi parser's assumption about what
the container with CRC is supposed to look like..
Change-Id: I3a23ef6c1502232742c03d227eb3654fb757709c
Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
if is_message and t.crc:
c = {}
c['crc'] = "{0:#0{1}x}".format(t.crc, 10)
if is_message and t.crc:
c = {}
c['crc'] = "{0:#0{1}x}".format(t.crc, 10)
+ c['options'] = t.options
raise ParseError("While parsing message `%s': could not find all "
"common header fields" % name)
for field in m[1:]:
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
self.crc = field['crc']
logger.debug("Found CRC `%s'" % self.crc)
continue