diff mbox series

[1/3] test-runner: allow infinite process wait

Message ID 20220719181647.452178-1-prestwoj@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show
Series [1/3] test-runner: allow infinite process wait | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success

Commit Message

James Prestwood July 19, 2022, 6:16 p.m. UTC
subprocess.Popen's wait() method was overwritten to be non-blocking but
in certain circumstances you do want to wait forever. Fix this to allow
timeout=None, which calls the parent wait() method directly.
---
 tools/utils.py | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/tools/utils.py b/tools/utils.py
index f3e12a85..156f8ce4 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -246,6 +246,10 @@  class Process(subprocess.Popen):
 
 	# Override wait() so it can do so non-blocking
 	def wait(self, timeout=10):
+		if timeout == None:
+			super().wait()
+			return
+
 		Namespace.non_block_wait(self.__wait, timeout, 1)
 		self._cleanup()