On 03/13/2017 01:18 AM, Markus Armbruster wrote:
> Signed-off-by: Markus Armbruster <arm...@redhat.com>
> ---
>  scripts/qapi.py | 45 +++++++++++++++++++++++----------------------
>  1 file changed, 23 insertions(+), 22 deletions(-)
> 

> 
> +++ b/scripts/qapi.py
> @@ -268,34 +268,15 @@ class QAPISchemaParser(object):
>                  continue
>  
>              expr = self.get_expr(False)
> -            if isinstance(expr, dict) and "include" in expr:
> +            if 'include' in expr:

What happens when expr is not a dict?
/me goes and reads get_expr()...
aha - get_expr() can only return a dict at the top level, and we are
only checking for includes at the top level (it can return non-dict when
nested, but this part of __init__ is not nested).

Reviewed-by: Eric Blake <ebl...@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to