From 5fb573f0ca42a7af6747785295a14db5f7fbb57b Mon Sep 17 00:00:00 2001 From: troymc Date: Wed, 13 Apr 2016 16:12:31 +0200 Subject: [PATCH] Removed old try..except from release_eips.py --- deploy-cluster-aws/release_eips.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/deploy-cluster-aws/release_eips.py b/deploy-cluster-aws/release_eips.py index a936ba6f..a3e1f855 100644 --- a/deploy-cluster-aws/release_eips.py +++ b/deploy-cluster-aws/release_eips.py @@ -15,7 +15,6 @@ Source: http://tinyurl.com/ozhxatx """ from __future__ import unicode_literals -import botocore import boto3 from awscommon import get_naeips @@ -38,14 +37,7 @@ for i, eip in enumerate(non_associated_eips): print('{}: Releasing {}'.format(i, public_ip)) domain = eip['Domain'] print('(It has Domain = {}.)'.format(domain)) - try: - if domain == 'vpc': - client.release_address(AllocationId=eip['AllocationId']) - else: - 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 + if domain == 'vpc': + client.release_address(AllocationId=eip['AllocationId']) + else: + client.release_address(PublicIp=public_ip)