git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Setting tag plcapi-5.4-2
[plcapi.git]
/
PLC
/
PyCurl.py
diff --git
a/PLC/PyCurl.py
b/PLC/PyCurl.py
index
e020882
..
4ae2fdc
100644
(file)
--- a/
PLC/PyCurl.py
+++ b/
PLC/PyCurl.py
@@
-5,8
+5,6
@@
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-#
import os
import xmlrpclib
import os
import xmlrpclib
@@
-51,7
+49,7
@@
class PyCurlTransport(xmlrpclib.Transport):
self.body = ""
def body(buf):
self.body += buf
self.body = ""
def body(buf):
self.body += buf
- self.curl.setopt(pycurl.WRITEFUNCTION, body)
+ self.curl.setopt(pycurl.WRITEFUNCTION, body)
def request(self, host, handler, request_body, verbose = 1):
# Set verbosity
def request(self, host, handler, request_body, verbose = 1):
# Set verbosity
@@
-73,7
+71,7
@@
class PyCurlTransport(xmlrpclib.Transport):
if errcode == 60:
raise Exception, "PyCurl: SSL certificate validation failed"
elif errcode != 200:
if errcode == 60:
raise Exception, "PyCurl: SSL certificate validation failed"
elif errcode != 200:
- raise Exception, "PyCurl: HTTP error %d -- %r" % (errcode,errmsg)
+
raise Exception, "PyCurl: HTTP error %d -- %r" % (errcode,errmsg)
# Parse response
p, u = self.getparser()
# Parse response
p, u = self.getparser()