qemu-e2k/scripts/qapi
Marc-André Lureau 4fca21c1b0 qapi: leave the ifcond attribute undefined until check()
We commonly initialize attributes to None in .init(), then set their
real value in .check().  Accessing the attribute before .check()
yields None.  If we're lucky, the code that accesses the attribute
prematurely chokes on None.

It won't for .ifcond, because None is a legitimate value.

Leave the ifcond attribute undefined until check().

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180703155648.11933-4-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-07-03 18:38:53 +02:00
..
__init__.py qapi-gen: New common driver for code and doc generators 2018-03-02 13:14:09 -06:00
commands.py qapi: introduce new cmd option "allow-preconfig" 2018-05-30 13:19:09 -03:00
common.py qapi: leave the ifcond attribute undefined until check() 2018-07-03 18:38:53 +02:00
doc.py qapi: introduce new cmd option "allow-preconfig" 2018-05-30 13:19:09 -03:00
events.py qapi/events: generate event enum in main module 2018-06-22 16:33:46 +02:00
introspect.py qapi/introspect: Eliminate pointless variable in .visit_end() 2018-06-22 16:33:47 +02:00
types.py qapi: allow empty branches in flat unions 2018-06-22 16:33:46 +02:00
visit.py qapi: allow empty branches in flat unions 2018-06-22 16:33:46 +02:00