From: Daniel P. Berrangé <[email protected]> The 'recv' method will return an empty byte array, not None, when the socket has EOF.
Signed-off-by: Daniel P. Berrangé <[email protected]> Reviewed-by: Thomas Huth <[email protected]> Reviewed-by: Alex Bennée <[email protected]> Message-ID: <[email protected]> Signed-off-by: Thomas Huth <[email protected]> --- tests/functional/qemu_test/cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test/cmd.py index 8069c89730b..f544566245b 100644 --- a/tests/functional/qemu_test/cmd.py +++ b/tests/functional/qemu_test/cmd.py @@ -54,7 +54,7 @@ def _console_read_line_until_match(test, vm, success, failure): done = False while True: c = vm.console_socket.recv(1) - if c is None: + if not c: done = True test.fail( f"EOF in console, expected '{success}'") -- 2.51.0
