diff options
author | arithmetic1728 <58957152+arithmetic1728@users.noreply.github.com> | 2020-09-03 11:15:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-03 11:15:13 -0700 |
commit | 8f8ee7879e4f834f3c676e535ffc41b5b9b2de62 (patch) | |
tree | 105dbd92560cb4f2301ca1d4cdec324ba65299b6 /google | |
parent | 622931721ce34839d630aa1e974c7d8f47b5d25e (diff) | |
download | python-api-core-8f8ee7879e4f834f3c676e535ffc41b5b9b2de62.tar.gz |
fix: only add quota project id if supported (#75)
Diffstat (limited to 'google')
-rw-r--r-- | google/api_core/grpc_helpers.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/google/api_core/grpc_helpers.py b/google/api_core/grpc_helpers.py index dfc8442..0ccbe12 100644 --- a/google/api_core/grpc_helpers.py +++ b/google/api_core/grpc_helpers.py @@ -216,7 +216,7 @@ def _create_composite_credentials( else: credentials, _ = google.auth.default(scopes=scopes) - if quota_project_id: + if quota_project_id and isinstance(credentials, google.auth.credentials.CredentialsWithQuotaProject): credentials = credentials.with_quota_project(quota_project_id) request = google.auth.transport.requests.Request() |