Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Handle urllib HTTPError

  • Loading branch information...
commit df978c4afc5610c3e3810d081e688e7e41a0292b 1 parent 45efa78
@kevinmehall kevinmehall authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  pithos/pandora/
3  pithos/pandora/
@@ -118,6 +118,9 @@ def xmlrpc_call(self, method, args=[], url_args=True, secure=False, includeTime=
req = urllib2.Request(url, data, {'User-agent': USER_AGENT, 'Content-type': 'text/xml'})
response =, timeout=HTTP_TIMEOUT)
text =
+ except urllib2.HTTPError as e:
+ logging.error("HTTP error: %s", e)
+ raise PandoraNetError(str(e))
except urllib2.URLError as e:
logging.error("Network error: %s", e)
if e.reason[0] == 'timed out':
Please sign in to comment.
Something went wrong with that request. Please try again.