Updated gam delete project to handle the following error:

```
ERROR: 400: failedPrecondition - Project not active
```
This commit is contained in:
Ross Scroggs
2025-11-21 16:25:31 -08:00
parent cecd9dc7ae
commit 36887ba658
2 changed files with 10 additions and 3 deletions

View File

@@ -1,3 +1,10 @@
7.28.12
Updated `gam delete project` to handle the following error:
```
ERROR: 400: failedPrecondition - Project not active
```
7.28.11
Removed all options/fields referencing inheritance from `gam create|update|info|print org` as this option/field is deprecated.

View File

@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
"""
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
__version__ = '7.28.11'
__version__ = '7.28.12'
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
#pylint: disable=wrong-import-position
@@ -12068,10 +12068,10 @@ def doDeleteProject():
projectId = project['projectId']
try:
callGAPI(crm.projects(), 'delete',
throwReasons=[GAPI.FORBIDDEN, GAPI.PERMISSION_DENIED],
throwReasons=[GAPI.FORBIDDEN, GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
name=project['name'])
entityActionPerformed([Ent.PROJECT, projectId])
except (GAPI.forbidden, GAPI.permissionDenied) as e:
except (GAPI.forbidden, GAPI.permissionDenied, GAPI.failedPrecondition) as e:
entityActionFailedWarning([Ent.PROJECT, projectId], str(e))
Ind.Decrement()