Skip to content

Commit

Permalink
Python 3 changes for ringogw.py
Browse files Browse the repository at this point in the history
  • Loading branch information
didip committed Oct 14, 2014
1 parent 1586b73 commit 6e9e5be
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions beaker_extensions/ringogw.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,14 @@ def request(self, url, data = None, verbose = False,
curl.setopt(curl.WRITEFUNCTION, dec.write)
try:
curl.perform()
except pycurl.error, x:
except pycurl.error as x:
if verbose:
print "Pycurl.error:", x
print("Pycurl.error:", x)
return x

code = curl.getinfo(curl.HTTP_CODE)
if verbose:
print "Request took %.2fms" %\
(curl.getinfo(curl.TOTAL_TIME) * 1000.0)
print("Request took %.2fms" % (curl.getinfo(curl.TOTAL_TIME) * 1000.0))

# Request timeout
if code == 408 and retries > 0:
Expand Down

0 comments on commit 6e9e5be

Please sign in to comment.