From 2652b3631eecd8d41b3abce9292a98850f6f0517 Mon Sep 17 00:00:00 2001 From: Tom Limoncelli <tlim@google.com> Date: Mon, 31 May 2010 13:09:00 -0400 Subject: [PATCH] RAPI client should convert urllib2.URLError to GanetiApiError Signed-off-by: Tom Limoncelli <tlim@google.com> Reviewed-by: Michael Hanselmann <hansmi@google.com> --- lib/rapi/client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rapi/client.py b/lib/rapi/client.py index 262e3893e..38f673b05 100644 --- a/lib/rapi/client.py +++ b/lib/rapi/client.py @@ -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) -- GitLab