Fix for: AttributeError: TimeoutTransport instance has no attribute '_use_datetime'

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30851 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent aed4295e
......@@ -65,6 +65,13 @@ class TimeoutTransport(SafeTransport):
def __init__(self, timeout=None, scheme='http'):
self._timeout = timeout
self._scheme = scheme
# On Python 2.6, .__init__() of Transport and SafeTransport must be called
# to set up the ._use_datetime attribute.
# sigh... too bad we can't use super() here, as SafeTransport is not
# a new-style class (as of Python 2.4 to 2.6)
# remove the gettattr below when we drop support for Python 2.4
super__init__ = getattr(SafeTransport, '__init__', lambda self: None)
super__init__(self)
def send_content(self, connection, request_body):
connection.putheader("Content-Type", "text/xml")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment