diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2009-06-02 15:17:42 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2009-06-02 15:17:42 +0000 |
| commit | 007d1f6de841dde064df0f0eac9f35f88a540ccb (patch) | |
| tree | 1e3e7f5d2cbd5a1a974d9ae90fb2e9c563c4dc86 /qpid/python | |
| parent | 1ba0e5f231a376c86830a038cd7ee81ec042c353 (diff) | |
| download | qpid-python-007d1f6de841dde064df0f0eac9f35f88a540ccb.tar.gz | |
modified empty generator idiom to work on python 2.4
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@781056 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
| -rwxr-xr-x | qpid/python/qpid-python-test | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/qpid/python/qpid-python-test b/qpid/python/qpid-python-test index 287637d7a0..1e342386cd 100755 --- a/qpid/python/qpid-python-test +++ b/qpid/python/qpid-python-test @@ -365,7 +365,8 @@ class FunctionScanner(PatternMatcher): return type(obj) == types.FunctionType and self.matches(name) def descend(self, func): - return; yield + # the None is required for older versions of python + return; yield None def extract(self, func): yield FunctionTest(func) @@ -376,7 +377,8 @@ class ClassScanner(PatternMatcher): return type(obj) in (types.ClassType, types.TypeType) and self.matches(obj.__name__) def descend(self, cls): - return; yield + # the None is required for older versions of python + return; yield None def extract(self, cls): names = dir(cls) @@ -399,7 +401,8 @@ class ModuleScanner: yield getattr(obj, name) def extract(self, obj): - return; yield + # the None is required for older versions of python + return; yield None class Harness: |
