You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2010/11/12 16:27:34 UTC

svn commit: r1034421 - /qpid/trunk/qpid/python/qpid/brokertest.py

Author: aconway
Date: Fri Nov 12 15:27:34 2010
New Revision: 1034421

URL: http://svn.apache.org/viewvc?rev=1034421&view=rev
Log:
Fix error in python tests: poll() takes exactly 1 argument (2 given)

Previous fix to a different problem on python 2.4 caused this problem on python 2.6.
This fix has been verified to work for both.

Modified:
    qpid/trunk/qpid/python/qpid/brokertest.py

Modified: qpid/trunk/qpid/python/qpid/brokertest.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/brokertest.py?rev=1034421&r1=1034420&r2=1034421&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/brokertest.py (original)
+++ qpid/trunk/qpid/python/qpid/brokertest.py Fri Nov 12 15:27:34 2010
@@ -227,9 +227,13 @@ class Popen(subprocess.Popen):
     def assert_running(self):
         if not self.is_running(): self.unexpected("Exit code %d" % self.returncode)
 
-    def poll(self, _deadstate=None):    # _deadstate required by base class in python 2.4
+    def poll(self, _deadstate=None): # _deadstate required by base class in python 2.4
         if self.returncode is None:
-            ret = subprocess.Popen.poll(self, _deadstate)
+            # Pass _deadstate only if it has been set, there is no _deadstate
+            # parameter in Python 2.6 
+            if _deadstate is None: ret = subprocess.Popen.poll(self)
+            else: ret = subprocess.Popen.poll(self, _deadstate)
+
             if (ret != -1):
                 self.returncode = ret
                 self._cleanup()



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org