event_match: always match on None value
commit9e8dfad045211fbb8f4184285747907517550f23
authorJohn Snow <jsnow@redhat.com>
Tue, 28 May 2019 18:38:57 +0000 (28 14:38 -0400)
committerMax Reitz <mreitz@redhat.com>
Fri, 14 Jun 2019 12:16:57 +0000 (14 14:16 +0200)
tree0d5a7e5e1d908fe039be427b59d3d069a5579771
parentba7704f2228f16ed61b9903801e28e17666c7e38
event_match: always match on None value

Before, event_match didn't always recurse if the event value was not a
dictionary, and would instead check for equality immediately.

By delaying equality checking to post-recursion, we can allow leaf
values like "5" to match "None" and take advantage of the generic
None-returns-True clause.

This makes the matching a little more obviously consistent at the
expense of being able to check for explicit None values, which is
probably not that important given what this function is used for.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20190528183857.26167-1-jsnow@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
python/qemu/__init__.py