summaryrefslogtreecommitdiff
path: root/qpid/python
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-05-16 20:01:20 +0000
committerRafael H. Schloming <rhs@apache.org>2008-05-16 20:01:20 +0000
commit534f82a6777e7cb8a52a8280ce0a4f8aa0d0c3f9 (patch)
tree347df45919a3c86aa8f1291298ba8bae902e9dd4 /qpid/python
parentc5cc6e073fe20cc44ff745c68494a48af0fb8411 (diff)
downloadqpid-python-534f82a6777e7cb8a52a8280ce0a4f8aa0d0c3f9.tar.gz
QPID-947: restrict docstring initialization to recent python versions
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@657191 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
-rw-r--r--qpid/python/qpid/invoker.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/qpid/python/qpid/invoker.py b/qpid/python/qpid/invoker.py
index 190a4ca288..635f3ee769 100644
--- a/qpid/python/qpid/invoker.py
+++ b/qpid/python/qpid/invoker.py
@@ -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