|
25 | 25 | """
|
26 | 26 |
|
27 | 27 | __author__ = 'Ross Scroggs < [email protected]>'
|
28 |
| -__version__ = '6.15.18' |
| 28 | +__version__ = '6.15.19' |
29 | 29 | __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
30 | 30 |
|
31 | 31 | #pylint: disable=wrong-import-position
|
@@ -9613,9 +9613,9 @@ def doCreateProject():
|
9613 | 9613 | sys.stdout.write(Msg.CREATING_PROJECT.format(body['displayName']))
|
9614 | 9614 | try:
|
9615 | 9615 | create_operation = callGAPI(crm.projects(), 'create',
|
9616 |
| - throwReasons=[GAPI.BAD_REQUEST, GAPI.ALREADY_EXISTS], |
| 9616 | + throwReasons=[GAPI.BAD_REQUEST, GAPI.ALREADY_EXISTS, GAPI.FAILED_PRECONDITION], |
9617 | 9617 | body=body)
|
9618 |
| - except (GAPI.badRequest, GAPI.alreadyExists) as e: |
| 9618 | + except (GAPI.badRequest, GAPI.alreadyExists, GAPI.failedPrecondition) as e: |
9619 | 9619 | entityActionFailedExit([Ent.USER, login_hint, Ent.PROJECT, projectInfo['projectId']], str(e))
|
9620 | 9620 | operation_name = create_operation['name']
|
9621 | 9621 | time.sleep(5) # Google recommends always waiting at least 5 seconds
|
@@ -14306,8 +14306,10 @@ def printOrgUnit(parentOrgUnit, tree):
|
14306 | 14306 |
|
14307 | 14307 | ALIAS_TARGET_TYPES = ['user', 'group', 'target']
|
14308 | 14308 |
|
14309 |
| -# gam create|update aliases|nicknames <EmailAddressEntity> user|group|target <UniqueID>|<EmailAddress> |
14310 |
| -# [verifynotinvitable] [notargetverify] |
| 14309 | +# gam create aliases|nicknames <EmailAddressEntity> user|group|target <UniqueID>|<EmailAddress> |
| 14310 | +# [verifynotinvitable] |
| 14311 | +# gam update aliases|nicknames <EmailAddressEntity> user|group|target <UniqueID>|<EmailAddress> |
| 14312 | +# [notargetverify] |
14311 | 14313 | def doCreateUpdateAliases():
|
14312 | 14314 | def verifyAliasTargetExists():
|
14313 | 14315 | if targetType != 'group':
|
@@ -14337,12 +14339,12 @@ def verifyAliasTargetExists():
|
14337 | 14339 | targetEmails = getEntityList(Cmd.OB_GROUP_ENTITY)
|
14338 | 14340 | entityLists = targetEmails if isinstance(targetEmails, dict) else None
|
14339 | 14341 | verifyNotInvitable = False
|
14340 |
| - verifyTarget = True |
| 14342 | + verifyTarget = updateCmd |
14341 | 14343 | while Cmd.ArgumentsRemaining():
|
14342 | 14344 | myarg = getArgument()
|
14343 |
| - if myarg == 'verifynotinvitable': |
| 14345 | + if (not updateCmd) and myarg == 'verifynotinvitable': |
14344 | 14346 | verifyNotInvitable = True
|
14345 |
| - elif myarg == 'notargetverify': |
| 14347 | + elif updateCmd and myarg == 'notargetverify': |
14346 | 14348 | verifyTarget = False
|
14347 | 14349 | else:
|
14348 | 14350 | unknownArgumentExit()
|
|
0 commit comments