diff options
author | Kevin Wolf <kwolf@redhat.com> | 2020-10-27 17:38:04 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2020-11-03 16:24:56 +0100 |
commit | 503c2b31b675c9fba2ff9711a79e55585304895a (patch) | |
tree | b7eb794860ddb96eab5f823ddf999d3085e6a96e /stubs/qemu-timer-notify-cb.c | |
parent | 6aec830e77a3f80952b41e421dc23c0041c1e399 (diff) | |
download | qemu-503c2b31b675c9fba2ff9711a79e55585304895a.zip qemu-503c2b31b675c9fba2ff9711a79e55585304895a.tar.gz qemu-503c2b31b675c9fba2ff9711a79e55585304895a.tar.bz2 |
iotests.py: Fix type check errors in wait_migration()
Commit 1847a4a8c20 clarified that event_wait() can return None (though
only with timeout=0) and commit f12a282ff47 annotated it as returning
Optional[QMPMessage].
Type checks in wait_migration() fail because of the unexpected optional
return type:
iotests.py:750: error: Value of type variable "Msg" of "log" cannot be "Optional[Dict[str, Any]]"
iotests.py:751: error: Value of type "Optional[Dict[str, Any]]" is not indexable
iotests.py:754: error: Value of type "Optional[Dict[str, Any]]" is not indexable
Fortunately, the non-zero default timeout is used in the event_wait()
call, so we can make mypy happy by just asserting this.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20201027163806.290960-2-kwolf@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'stubs/qemu-timer-notify-cb.c')
0 files changed, 0 insertions, 0 deletions