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 | 2fb589c740a430b7b248d3fcce5c730bb2249daa (patch) | |
tree | d4a7521f368d669e5369b7b43f7406765174218f /python/qpid-python-test | |
parent | 8664304b9781be333636baa887569547e7f76546 (diff) | |
download | qpid-python-2fb589c740a430b7b248d3fcce5c730bb2249daa.tar.gz |
modified empty generator idiom to work on python 2.4
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@781056 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid-python-test')
-rwxr-xr-x | python/qpid-python-test | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/python/qpid-python-test b/python/qpid-python-test index 287637d7a0..1e342386cd 100755 --- a/python/qpid-python-test +++ b/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: |