From 88a12f5526e75c6c0a581143f649d70c86121d10 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Wed, 4 Nov 2015 23:03:21 +0000 Subject: Handle keyword args on our patched Popen methods. Python 3 introduces the `timeout` keyword argument on Popen.wait(). If our patched version doesn't support keyword arguments, then when the internal Python implementation attempts to call wait() with the keyword argument, things will explode. Such as my head, after I finally figured out what was happening. llvm-svn: 252092 --- .../Python/lldbsuite/test/test_runner/lib/process_control.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test/test_runner') diff --git a/lldb/packages/Python/lldbsuite/test/test_runner/lib/process_control.py b/lldb/packages/Python/lldbsuite/test/test_runner/lib/process_control.py index ba30840147e..50bcdab33c5 100644 --- a/lldb/packages/Python/lldbsuite/test/test_runner/lib/process_control.py +++ b/lldb/packages/Python/lldbsuite/test/test_runner/lib/process_control.py @@ -619,10 +619,10 @@ def patched_init(self, *args, **kwargs): self.wait_condition = threading.Condition() -def patched_wait(self): +def patched_wait(self, *args, **kwargs): self.wait_condition.acquire() try: - result = self.original_wait() + result = self.original_wait(*args, **kwargs) # The process finished. Signal the condition. self.wait_condition.notify_all() return result @@ -630,10 +630,10 @@ def patched_wait(self): self.wait_condition.release() -def patched_poll(self): +def patched_poll(self, *args, **kwargs): self.wait_condition.acquire() try: - result = self.original_poll() + result = self.original_poll(*args, **kwargs) if self.returncode is not None: # We did complete, and we have the return value. # Signal the event to indicate we're done. -- cgit v1.2.3