mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 21:03:54 -06:00
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>
This commit is contained in:
parent
1dda0404d8
commit
7af67d694e
1 changed files with 2 additions and 2 deletions
|
@ -120,14 +120,14 @@ class QEMUMonitorProtocol:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Check for new events regardless and pull them into the cache:
|
# Check for new events regardless and pull them into the cache:
|
||||||
self.__sock.setblocking(0)
|
self.__sock.setblocking(False)
|
||||||
try:
|
try:
|
||||||
self.__json_read()
|
self.__json_read()
|
||||||
except OSError as err:
|
except OSError as err:
|
||||||
if err.errno == errno.EAGAIN:
|
if err.errno == errno.EAGAIN:
|
||||||
# No data available
|
# No data available
|
||||||
pass
|
pass
|
||||||
self.__sock.setblocking(1)
|
self.__sock.setblocking(True)
|
||||||
|
|
||||||
# Wait for new events, if needed.
|
# Wait for new events, if needed.
|
||||||
# if wait is 0.0, this means "no wait" and is also implicitly false.
|
# if wait is 0.0, this means "no wait" and is also implicitly false.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue