diff --git a/product/ERP5OOo/Document/OOoDocument.py b/product/ERP5OOo/Document/OOoDocument.py index 662ad396b47f2197e5da3fe74d8fb2d2601a6a7d..0dec8f00f7b378ee8c193fea747aa64e9055e032 100644 --- a/product/ERP5OOo/Document/OOoDocument.py +++ b/product/ERP5OOo/Document/OOoDocument.py @@ -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")