Commit e66ac548 authored by Vincent Pelletier's avatar Vincent Pelletier

Get rid of python's xml module AttributeError happening upon interpreter shutdown.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27229 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9bbdd441
...@@ -163,6 +163,19 @@ class MethodWrapper(object): ...@@ -163,6 +163,19 @@ class MethodWrapper(object):
# Be on the safe side by using threading.local as a storage for it. # Be on the safe side by using threading.local as a storage for it.
wsdl_cache = threading.local() 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: class SOAPWSDLConnection:
""" """
Holds a SOAP connection described by a WSDL file. Holds a SOAP connection described by a WSDL file.
......
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