Run xmlrpclib.Transport's __init__ too (required on F7).
[plcapi.git] / PLC / PyCurl.py
index 14e14c4..a494fa7 100644 (file)
@@ -5,7 +5,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 #
-# $Id: PyCurl.py,v 1.1 2006/12/15 18:21:39 mlhuang Exp $
+# $Id$
 #
 
 import os
@@ -15,6 +15,7 @@ from tempfile import NamedTemporaryFile
 
 class PyCurlTransport(xmlrpclib.Transport):
     def __init__(self, uri, cert = None, timeout = 300):
+        xmlrpclib.Transport.__init__(self)
         self.curl = pycurl.Curl()
 
         # Suppress signals
@@ -70,7 +71,7 @@ class PyCurlTransport(xmlrpclib.Transport):
         if errcode == 60:
             raise Exception, "PyCurl: SSL certificate validation failed"
         elif errcode != 200:
-            raise Exception, "PyCurl: HTTP error %d" % errcode
+           raise Exception, "PyCurl: HTTP error %d -- %r" % (errcode,errmsg)
 
         # Parse response
         p, u = self.getparser()