qemu-e2k/python/qemu
John Snow 39cf73c349 python/qemu/qmp.py: Fix settimeout operation
We enabled callers to interface directly with settimeout, but this
reacts poorly with blocking/nonblocking operation; as they are using the
same internal mechanism.

1. Whenever we change the blocking mechanism temporarily, always set it
back to what it was afterwards.

2. Disallow callers from setting a timeout of "0", which means
Non-blocking mode. This is going to create more weird problems than
anybody wants, so just forbid it.

I opt not to coerce '0' to 'None' to maintain the principal of least
surprise in mirroring the semantics of Python's interface.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20201009175123.249009-4-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2020-10-20 15:00:06 -04:00
..
__init__.py
.flake8
.isort.cfg python/qemu: use isort to lay out imports 2020-10-20 09:37:57 -04:00
accel.py python/qemu: Add mypy type annotations 2020-10-20 09:37:57 -04:00
console_socket.py python/qemu/console_socket.py: avoid encoding to/from string 2020-10-20 09:37:57 -04:00
machine.py python/qemu: Add mypy type annotations 2020-10-20 09:37:57 -04:00
pylintrc python/qemu: Cleanup changes to ConsoleSocket 2020-07-27 09:41:52 +01:00
qmp.py python/qemu/qmp.py: Fix settimeout operation 2020-10-20 15:00:06 -04:00
qtest.py python/qemu: Add mypy type annotations 2020-10-20 09:37:57 -04:00