aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/210
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2021-04-21 14:20:26 -0400
committerMarkus Armbruster <armbru@redhat.com>2021-04-30 12:59:54 +0200
commit210fd63104525b6e3154de529565258f19146f1a (patch)
treebd8bac6a9cae991ea561ae21dac00886b20e0f88 /tests/qemu-iotests/210
parentb9ad358aa057e83f8039a1e222d6941d2bf1f70a (diff)
qapi/expr.py: Consolidate check_if_str calls in check_if
This is a small rewrite to address some minor style nits. Don't compare against the empty list to check for the empty condition, and move the normalization forward to unify the check on the now-normalized structure. With the check unified, the local nested function isn't needed anymore and can be brought down into the normal flow of the function. With the nesting level changed, shuffle the error strings around a bit to get them to fit in 79 columns. Note: although ifcond is typed as Sequence[str] elsewhere, we *know* that the parser will produce real, bona-fide lists. It's okay to check isinstance(ifcond, list) here. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20210421182032.3521476-12-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/210')
0 files changed, 0 insertions, 0 deletions