use transport and bump retries

This commit is contained in:
Jay Lee
2023-04-05 17:18:10 +00:00
parent 1b8d0877f3
commit 5e1df9263b
2 changed files with 5 additions and 1 deletions

View File

@@ -73,8 +73,10 @@ class SignJwt(google.auth.crypt.Signer):
def sign(self, message):
''' Call IAM Credentials SignJWT API to get our signed JWT '''
request = transport.create_request()
try:
credentials, _ = google.auth.default(scopes='https://www.googleapis.com/auth/iam')
credentials, _ = google.auth.default(scopes='https://www.googleapis.com/auth/iam',
request=request)
except google.auth.exceptions.DefaultCredentialsError as e:
controlflow.system_error_exit(2, e)
httpObj = transport.AuthorizedHttp(

View File

@@ -9,6 +9,8 @@ from gam.var import GC_TLS_MAX_VERSION
from gam.var import GC_TLS_MIN_VERSION
from gam.var import GC_Values
# Bump default retries
httplib2.RETRIES = 5
def create_http(cache=None,
timeout=None,