From: John Snow Date: Fri, 10 Jul 2020 05:06:49 +0000 (-0400) Subject: python/machine.py: change default wait timeout to 3 seconds X-Git-Tag: v5.1.0-rc0~3^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=04f0e36eba7b1a06e413a0690d4b1a24994d99fe;p=thirdparty%2Fqemu.git python/machine.py: change default wait timeout to 3 seconds Machine.wait() does not appear to be used except in the acceptance tests, and an infinite timeout by default in a test suite is not the most helpful. Change it to 3 seconds, like the default shutdown timeout. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Message-Id: <20200710050649.32434-13-jsnow@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- diff --git a/python/qemu/machine.py b/python/qemu/machine.py index 736a3c906fd..69055189bd9 100644 --- a/python/qemu/machine.py +++ b/python/qemu/machine.py @@ -486,12 +486,12 @@ class QEMUMachine: """ self.shutdown(hard=True) - def wait(self, timeout: Optional[int] = None) -> None: + def wait(self, timeout: Optional[int] = 3) -> None: """ Wait for the VM to power off and perform post-shutdown cleanup. :param timeout: Optional timeout in seconds. - Default None, an infinite wait. + Default 3 seconds, A value of None is an infinite wait. """ self.shutdown(has_quit=True, timeout=timeout)