Author: rhs Date: Tue Jun 2 15:17:42 2009 New Revision: 781056 URL: http://svn.apache.org/viewvc?rev=781056&view=rev Log: modified empty generator idiom to work on python 2.4
Modified: qpid/trunk/qpid/python/qpid-python-test Modified: qpid/trunk/qpid/python/qpid-python-test URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid-python-test?rev=781056&r1=781055&r2=781056&view=diff ============================================================================== --- qpid/trunk/qpid/python/qpid-python-test (original) +++ qpid/trunk/qpid/python/qpid-python-test Tue Jun 2 15:17:42 2009 @@ -365,7 +365,8 @@ 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 @@ 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 @@ yield getattr(obj, name) def extract(self, obj): - return; yield + # the None is required for older versions of python + return; yield None class Harness: --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org