diff --git a/product/ERP5Type/ConnectionPlugin/SOAPWSDLConnection.py b/product/ERP5Type/ConnectionPlugin/SOAPWSDLConnection.py index 1ac63fb8552c246d7e21062193f3a3bbc181c447..020de97185ec74e2fa5687b9f78a0aa07849682f 100644 --- a/product/ERP5Type/ConnectionPlugin/SOAPWSDLConnection.py +++ b/product/ERP5Type/ConnectionPlugin/SOAPWSDLConnection.py @@ -163,6 +163,19 @@ class MethodWrapper(object): # Be on the safe side by using threading.local as a storage for it. wsdl_cache = threading.local() +# XXX: SOAPpy.wstools.WSDLTools.WSDL.__del__ calls unlink on an xml document +# instance, which happens to fail (AttributeError: NoneType has no attribute +# 'unlink') somewhere down in xml module. As that unlink is only acting on xml +# nodes in memory, it's safe to ignore it. +def WSDL___del__(self): + if self.document is not None: + unlink = self.document.unlink + try: + unlink() + except AttributeError: + pass +SOAPpy.wstools.WSDLTools.WSDL.__del__ = WSDL___del__ + class SOAPWSDLConnection: """ Holds a SOAP connection described by a WSDL file.