mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Removed old try..except from release_eips.py
This commit is contained in:
parent
f5ab5b0230
commit
5fb573f0ca
@ -15,7 +15,6 @@ Source: http://tinyurl.com/ozhxatx
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import botocore
|
|
||||||
import boto3
|
import boto3
|
||||||
from awscommon import get_naeips
|
from awscommon import get_naeips
|
||||||
|
|
||||||
@ -38,14 +37,7 @@ for i, eip in enumerate(non_associated_eips):
|
|||||||
print('{}: Releasing {}'.format(i, public_ip))
|
print('{}: Releasing {}'.format(i, public_ip))
|
||||||
domain = eip['Domain']
|
domain = eip['Domain']
|
||||||
print('(It has Domain = {}.)'.format(domain))
|
print('(It has Domain = {}.)'.format(domain))
|
||||||
try:
|
|
||||||
if domain == 'vpc':
|
if domain == 'vpc':
|
||||||
client.release_address(AllocationId=eip['AllocationId'])
|
client.release_address(AllocationId=eip['AllocationId'])
|
||||||
else:
|
else:
|
||||||
client.release_address(PublicIp=public_ip)
|
client.release_address(PublicIp=public_ip)
|
||||||
except botocore.exceptions.ClientError as e:
|
|
||||||
print('A boto error occurred:')
|
|
||||||
raise
|
|
||||||
except:
|
|
||||||
print('An unexpected error occurred:')
|
|
||||||
raise
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user