Author: zturner
Date: Wed Nov  4 17:03:21 2015
New Revision: 252092

URL: http://llvm.org/viewvc/llvm-project?rev=252092&view=rev
Log:
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.

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/test_runner/lib/process_control.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/test_runner/lib/process_control.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/test_runner/lib/process_control.py?rev=252092&r1=252091&r2=252092&view=diff
==============================================================================
--- 
lldb/trunk/packages/Python/lldbsuite/test/test_runner/lib/process_control.py 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/test_runner/lib/process_control.py 
Wed Nov  4 17:03:21 2015
@@ -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.


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to