on older versions of python xmlrpclib.Transport does not have a __init__ method
[plcapi.git] / PLC / PyCurl.py
index 32051b4..e020882 100644 (file)
@@ -15,7 +15,8 @@ from tempfile import NamedTemporaryFile
 
 class PyCurlTransport(xmlrpclib.Transport):
     def __init__(self, uri, cert = None, timeout = 300):
-        xmlrpclib.Transport.__init__(self)
+        if hasattr(xmlrpclib.Transport,'__init__'):
+            xmlrpclib.Transport.__init__(self)
         self.curl = pycurl.Curl()
 
         # Suppress signals