mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-10 14:43:34 +00:00
googleapiclient 1.6.4
This commit is contained in:
@ -12,7 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
__version__ = "1.6.3"
|
__version__ = "1.6.4"
|
||||||
|
|
||||||
# Set default logging handler to avoid "No handler found" warnings.
|
# Set default logging handler to avoid "No handler found" warnings.
|
||||||
import logging
|
import logging
|
||||||
|
@ -19,11 +19,15 @@ import httplib2
|
|||||||
try:
|
try:
|
||||||
import google.auth
|
import google.auth
|
||||||
import google.auth.credentials
|
import google.auth.credentials
|
||||||
import google_auth_httplib2
|
|
||||||
HAS_GOOGLE_AUTH = True
|
HAS_GOOGLE_AUTH = True
|
||||||
except ImportError: # pragma: NO COVER
|
except ImportError: # pragma: NO COVER
|
||||||
HAS_GOOGLE_AUTH = False
|
HAS_GOOGLE_AUTH = False
|
||||||
|
|
||||||
|
try:
|
||||||
|
import google_auth_httplib2
|
||||||
|
except ImportError: # pragma: NO COVER
|
||||||
|
google_auth_httplib2 = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import oauth2client
|
import oauth2client
|
||||||
import oauth2client.client
|
import oauth2client.client
|
||||||
@ -88,6 +92,12 @@ def authorized_http(credentials):
|
|||||||
|
|
||||||
if HAS_GOOGLE_AUTH and isinstance(
|
if HAS_GOOGLE_AUTH and isinstance(
|
||||||
credentials, google.auth.credentials.Credentials):
|
credentials, google.auth.credentials.Credentials):
|
||||||
|
if google_auth_httplib2 is None:
|
||||||
|
raise ValueError(
|
||||||
|
'Credentials from google.auth specified, but '
|
||||||
|
'google-api-python-client is unable to use these credentials '
|
||||||
|
'unless google-auth-httplib2 is installed. Please install '
|
||||||
|
'google-auth-httplib2.')
|
||||||
return google_auth_httplib2.AuthorizedHttp(credentials,
|
return google_auth_httplib2.AuthorizedHttp(credentials,
|
||||||
http=build_http())
|
http=build_http())
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user