Commit 2652b363 authored by Tom Limoncelli's avatar Tom Limoncelli Committed by Michael Hanselmann
Browse files

RAPI client should convert urllib2.URLError to GanetiApiError


Signed-off-by: default avatarTom Limoncelli <tlim@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent e43d4f9f
......@@ -421,6 +421,8 @@ class GanetiRapiClient(object):
raise CertificateError("SSL issue: %s (%r)" % (err, err))
except urllib2.HTTPError, err:
raise GanetiApiError(str(err), code=err.code)
except urllib2.URLError, err:
raise GanetiApiError(str(err))
if encoded_response_content:
response_content = simplejson.loads(encoded_response_content)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment