diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2018-07-03 17:56:37 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-07-03 18:38:53 +0200 |
commit | 4fca21c1b043cb1ef2e197ef15e7474ba668d925 (patch) | |
tree | 6237a61aae6f4a377e3351c80928014fe886c063 /scripts/qapi/doc.py | |
parent | 2cbc94376e718448699036be7f6e29ab75312b70 (diff) |
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>
Diffstat (limited to 'scripts/qapi/doc.py')
0 files changed, 0 insertions, 0 deletions