Skip to content

Commit

Permalink
Merge branch 'master' into add-twcs-jar-for-2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
a1exsh authored May 30, 2017
2 parents b92efcf + 404da04 commit b567f32
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions planb/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,10 @@ def get_instance_profile(cluster_name: str) -> dict:
profile_name = make_instance_profile_name(cluster_name)
profile = iam.get_instance_profile(InstanceProfileName=profile_name)
return profile['InstanceProfile']
except botocore.errorfactory.NoSuchEntityException:
return None
except botocore.exceptions.ClientError as e:
if e.response['Error']['Code'] == 'NoSuchEntity':
return None
raise e


def create_instance_profile(cluster_name: str):
Expand Down

0 comments on commit b567f32

Please sign in to comment.