You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2008/05/16 22:01:20 UTC
svn commit: r657191 - /incubator/qpid/trunk/qpid/python/qpid/invoker.py
Author: rhs
Date: Fri May 16 13:01:20 2008
New Revision: 657191
URL: http://svn.apache.org/viewvc?rev=657191&view=rev
Log:
QPID-947: restrict docstring initialization to recent python versions
Modified:
incubator/qpid/trunk/qpid/python/qpid/invoker.py
Modified: incubator/qpid/trunk/qpid/python/qpid/invoker.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/qpid/invoker.py?rev=657191&r1=657190&r2=657191&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/qpid/invoker.py (original)
+++ incubator/qpid/trunk/qpid/python/qpid/invoker.py Fri May 16 13:01:20 2008
@@ -17,15 +17,18 @@
# under the License.
#
+import sys
+
# TODO: need a better naming for this class now that it does the value
# stuff
class Invoker:
def METHOD(self, name, resolved):
method = lambda *args, **kwargs: self.invoke(resolved, args, kwargs)
- method.__name__ = resolved.pyname
- method.__doc__ = resolved.pydoc
- method.__module__ = self.__class__.__module__
+ if sys.version_info[:2] > (2, 3):
+ method.__name__ = resolved.pyname
+ method.__doc__ = resolved.pydoc
+ method.__module__ = self.__class__.__module__
self.__dict__[name] = method
return method