diff options
| author | John Snow | 2021-04-21 20:20:22 +0200 |
|---|---|---|
| committer | Markus Armbruster | 2021-04-30 12:59:54 +0200 |
| commit | 4918bb7defbdcb1e27cc2adf4e1604486d778ece (patch) | |
| tree | 0082b34f878d1c7dc8cf42c493a2597de312f253 /tests/qapi-schema/features-no-list.json | |
| parent | qapi/expr.py: move string check upwards in check_type (diff) | |
| download | qemu-4918bb7defbdcb1e27cc2adf4e1604486d778ece.tar.gz qemu-4918bb7defbdcb1e27cc2adf4e1604486d778ece.tar.xz qemu-4918bb7defbdcb1e27cc2adf4e1604486d778ece.zip | |
qapi/expr.py: Check type of union and alternate 'data' member
Prior to this commit, specifying a non-object value here causes the QAPI
parser to crash in expr.py with a stack trace with (likely) an
AttributeError when we attempt to call that value's items() method.
This member needs to be an object (Dict), and not anything else. Add a
check for this with a nicer error message, and formalize that check with
new test cases that exercise that error.
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421182032.3521476-8-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/qapi-schema/features-no-list.json')
0 files changed, 0 insertions, 0 deletions
