diff options
author | Alan Conway <aconway@apache.org> | 2010-11-12 15:27:34 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2010-11-12 15:27:34 +0000 |
commit | cbb1f8f1b00088d24ac3951e8230bc65984cda3d (patch) | |
tree | 9cf820c6bfed64937164af6e1aab93772751f08a /python | |
parent | b0e8f2db7791bf2c08bb25673e44ec8362816cae (diff) | |
download | qpid-python-cbb1f8f1b00088d24ac3951e8230bc65984cda3d.tar.gz |
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.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1034421 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
-rw-r--r-- | python/qpid/brokertest.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/python/qpid/brokertest.py b/python/qpid/brokertest.py index 6222b0b521..14be7c43c9 100644 --- a/python/qpid/brokertest.py +++ b/python/qpid/brokertest.py @@ -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() |