diff options
author | Zachary Turner <zturner@google.com> | 2015-11-04 23:03:21 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2015-11-04 23:03:21 +0000 |
commit | 88a12f5526e75c6c0a581143f649d70c86121d10 (patch) | |
tree | e7270e5c0435ef3ed8faec06b7811053bdb65758 /lldb/packages/Python/lldbsuite/test | |
parent | 9858899148d97e780cc1a3da8b1e39420cf56a04 (diff) | |
download | bcm5719-llvm-88a12f5526e75c6c0a581143f649d70c86121d10.tar.gz bcm5719-llvm-88a12f5526e75c6c0a581143f649d70c86121d10.zip |
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
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/test_runner/lib/process_control.py | 8 |
1 files changed, 4 insertions, 4 deletions
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. |