Skip to content
Snippets Groups Projects
Commit 7af67d69 authored by John Snow's avatar John Snow Committed by Philippe Mathieu-Daudé
Browse files

python/qemu/qmp: use True/False for non/blocking modes


The type system doesn't want integers.

Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200514055403.18902-15-jsnow@redhat.com>
Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
parent 1dda0404
No related branches found
No related tags found
No related merge requests found
......@@ -120,14 +120,14 @@ def __get_events(self, wait=False):
"""
# Check for new events regardless and pull them into the cache:
self.__sock.setblocking(0)
self.__sock.setblocking(False)
try:
self.__json_read()
except OSError as err:
if err.errno == errno.EAGAIN:
# No data available
pass
self.__sock.setblocking(1)
self.__sock.setblocking(True)
# Wait for new events, if needed.
# if wait is 0.0, this means "no wait" and is also implicitly false.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment