From 099d0176d6a77b0d8034b651763e1a8db30701ed Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 20 Dec 2017 16:58:03 -0500 Subject: [PATCH] upgrade google_auth_httplib2 --- src/google_auth_httplib2.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/google_auth_httplib2.py b/src/google_auth_httplib2.py index 98e64075..51c406eb 100644 --- a/src/google_auth_httplib2.py +++ b/src/google_auth_httplib2.py @@ -21,6 +21,7 @@ import logging from google.auth import exceptions from google.auth import transport import httplib2 +from six.moves import http_client _LOGGER = logging.getLogger(__name__) @@ -115,7 +116,9 @@ class Request(transport.Request): response, data = self.http.request( url, method=method, body=body, headers=headers, **kwargs) return _Response(response, data) - except httplib2.HttpLib2Error as exc: + # httplib2 should catch the lower http error, this is a bug and + # needs to be fixed there. Catch the error for the meanwhile. + except (httplib2.HttpLib2Error, http_client.HTTPException) as exc: raise exceptions.TransportError(exc)