From 2fb589c740a430b7b248d3fcce5c730bb2249daa Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Tue, 2 Jun 2009 15:17:42 +0000 Subject: 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 --- python/qpid-python-test | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'python/qpid-python-test') 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: -- cgit v1.2.1