From 5a8d7c61771ea62d0dd3189896c69e8cd6771316 Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Wed, 2 Aug 2017 12:58:23 -0700 Subject: [PATCH] Don't treat httplib2.Credentials as oauth credentials --- googleapiclient/_auth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/googleapiclient/_auth.py b/googleapiclient/_auth.py index 05a1d38b440..92f2796f45b 100644 --- a/googleapiclient/_auth.py +++ b/googleapiclient/_auth.py @@ -126,7 +126,8 @@ def get_credentials_from_http(http): return None elif hasattr(http.request, 'credentials'): return http.request.credentials - elif hasattr(http, 'credentials'): + elif (hasattr(http, 'credentials') + and not isinstance(http.credentials, httplib2.Credentials)): return http.credentials else: return None