diff options
author | John Snow | 2020-05-14 07:53:45 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé | 2020-05-31 18:25:31 +0200 |
commit | 7af67d694e289ab116c7abeca8a5bd752fbd46d7 (patch) | |
tree | f24e2162664b64bed1ede7b00d3eadc7c9ace1a4 | |
parent | python/qemu: Adjust traceback typing (diff) | |
download | qemu-7af67d694e289ab116c7abeca8a5bd752fbd46d7.tar.gz qemu-7af67d694e289ab116c7abeca8a5bd752fbd46d7.tar.xz qemu-7af67d694e289ab116c7abeca8a5bd752fbd46d7.zip |
python/qemu/qmp: use True/False for non/blocking modes
The type system doesn't want integers.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200514055403.18902-15-jsnow@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
-rw-r--r-- | python/qemu/qmp.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/qemu/qmp.py b/python/qemu/qmp.py index b91c9d5c1c..a634c4e26c 100644 --- a/python/qemu/qmp.py +++ b/python/qemu/qmp.py @@ -120,14 +120,14 @@ class QEMUMonitorProtocol: """ # 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. |