mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #47430 from baniobloom/vpc_association_not_found
Add catch for VPCAssociationNotFound
This commit is contained in:
commit
17c4c8443c
1 changed files with 4 additions and 0 deletions
|
@ -640,6 +640,10 @@ def disassociate_vpc_from_hosted_zone(HostedZoneId=None, Name=None, VPCId=None,
|
|||
r = conn.disassociate_vpc_from_hosted_zone(**args)
|
||||
return _wait_for_sync(r['ChangeInfo']['Id'], conn)
|
||||
except ClientError as e:
|
||||
if e.response.get('Error', {}).get('Code') == 'VPCAssociationNotFound':
|
||||
log.debug('No VPC Association exists.')
|
||||
# return True since the current state is the desired one
|
||||
return True
|
||||
if tries and e.response.get('Error', {}).get('Code') == 'Throttling':
|
||||
log.debug('Throttled by AWS API.')
|
||||
time.sleep(3)
|
||||
|
|
Loading…
Add table
Reference in a new issue