mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 18:01:36 +00:00
Updated gam print admins to handle the following error
ERROR: 404: notFound - Requested entity was not found.
This commit is contained in:
@@ -5628,9 +5628,9 @@ def getServiceAccountEmailFromID(account_id, sal=None):
|
||||
sal = buildGAPIObject(API.SERVICEACCOUNTLOOKUP)
|
||||
try:
|
||||
certs = callGAPI(sal.serviceaccounts(), 'lookup',
|
||||
throwReasons = [GAPI.BAD_REQUEST, GAPI.RESOURCE_NOT_FOUND, GAPI.INVALID_ARGUMENT],
|
||||
throwReasons = [GAPI.BAD_REQUEST, GAPI.NOT_FOUND, GAPI.RESOURCE_NOT_FOUND, GAPI.INVALID_ARGUMENT],
|
||||
account=account_id)
|
||||
except (GAPI.badRequest, GAPI.resourceNotFound, GAPI.invalidArgument):
|
||||
except (GAPI.badRequest, GAPI.notFound, GAPI.resourceNotFound, GAPI.invalidArgument):
|
||||
return None
|
||||
sa_cn_rx = r'CN=(.+)\.(.+)\.iam\.gservice.*'
|
||||
sa_emails = []
|
||||
|
||||
Reference in New Issue
Block a user