diff options
| author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2021-08-04 12:31:01 +0400 |
|---|---|---|
| committer | Markus Armbruster <armbru@redhat.com> | 2021-08-26 13:53:56 +0200 |
| commit | 5d83b9a130690f879d5f33e991beabe69cb88bc8 (patch) | |
| tree | ec68563193b1bbaafb4614a08e15845d33f8d7d9 /scripts/qapi/schema.py | |
| parent | d806f89f87152def5f422e946c84948831615236 (diff) | |
| download | focaccia-qemu-5d83b9a130690f879d5f33e991beabe69cb88bc8.tar.gz focaccia-qemu-5d83b9a130690f879d5f33e991beabe69cb88bc8.zip | |
qapi: replace if condition list with dict {'all': [...]}
Replace the simple list sugar form with a recursive structure that will accept other operators in the following commits (all, any or not). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210804083105.97531-7-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Accidental code motion undone. Degenerate :forms: comment dropped. Helper _check_if() moved. Error messages tweaked. ui.json updated. Accidental changes to qapi-schema-test.json dropped.] Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/qapi/schema.py')
| -rw-r--r-- | scripts/qapi/schema.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py index a9345af7b7..229d24fce9 100644 --- a/scripts/qapi/schema.py +++ b/scripts/qapi/schema.py @@ -32,7 +32,7 @@ from .parser import QAPISchemaParser class QAPISchemaIfCond: def __init__(self, ifcond=None): - self.ifcond = ifcond or [] + self.ifcond = ifcond or {} def cgen(self): return cgen_ifcond(self.ifcond) |