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 | d0c9efcb701898f204b4373f949079b1fb5f88cd (patch) | |
| tree | 1c80b6bdfa80ad034817f2e4f43d2b137da71757 /qpid/python | |
| parent | 7168bfcbc95ac16a81e85f22629ce581c5ff05f6 (diff) | |
| download | qpid-python-d0c9efcb701898f204b4373f949079b1fb5f88cd.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@1034421 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
| -rw-r--r-- | qpid/python/qpid/brokertest.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/qpid/python/qpid/brokertest.py b/qpid/python/qpid/brokertest.py index 6222b0b521..14be7c43c9 100644 --- a/qpid/python/qpid/brokertest.py +++ b/qpid/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() |
