diff options
author | arithmetic1728 <58957152+arithmetic1728@users.noreply.github.com> | 2021-10-21 15:25:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-21 15:25:46 -0700 |
commit | 5bd5ccf7cf229f033c7152ce0b650a40feb25f81 (patch) | |
tree | fb08f54a8732706a7633da0d464ae3823fd3fb4b /google/auth/_default_async.py | |
parent | e2b3c98cd8c67b702be1b711c06ee7b9bbedb8ba (diff) | |
download | google-auth-library-python-5bd5ccf7cf229f033c7152ce0b650a40feb25f81.tar.gz |
fix: add back python 2.7 for gcloud usage only (#892)
* fix: add back python 2.7 for gcloud
* fix: fix setup and tests
* fix: add enum34 for python 2.7
* fix: add app engine app and fix noxfile
* fix: move test_app_engine.py
* fix: fix downscoped
* fix: fix downscoped
* fix: remove py2 from classifiers
Diffstat (limited to 'google/auth/_default_async.py')
-rw-r--r-- | google/auth/_default_async.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/google/auth/_default_async.py b/google/auth/_default_async.py index 3fa125b..fb277c5 100644 --- a/google/auth/_default_async.py +++ b/google/auth/_default_async.py @@ -21,6 +21,8 @@ import io import json import os +import six + from google.auth import _default from google.auth import environment_vars from google.auth import exceptions @@ -61,7 +63,7 @@ def load_credentials_from_file(filename, scopes=None, quota_project_id=None): new_exc = exceptions.DefaultCredentialsError( "File {} is not a valid json file.".format(filename), caught_exc ) - raise new_exc from caught_exc + six.raise_from(new_exc, caught_exc) # The type key should indicate that the file is either a service account # credentials file or an authorized user credentials file. @@ -77,7 +79,7 @@ def load_credentials_from_file(filename, scopes=None, quota_project_id=None): except ValueError as caught_exc: msg = "Failed to load authorized user credentials from {}".format(filename) new_exc = exceptions.DefaultCredentialsError(msg, caught_exc) - raise new_exc from caught_exc + six.raise_from(new_exc, caught_exc) if quota_project_id: credentials = credentials.with_quota_project(quota_project_id) if not credentials.quota_project_id: @@ -94,7 +96,7 @@ def load_credentials_from_file(filename, scopes=None, quota_project_id=None): except ValueError as caught_exc: msg = "Failed to load service account credentials from {}".format(filename) new_exc = exceptions.DefaultCredentialsError(msg, caught_exc) - raise new_exc from caught_exc + six.raise_from(new_exc, caught_exc) return credentials, info.get("project_id") else: |