IAM: get_role should thrown when role is unexisting

This commit is contained in:
Simon-Pierre Gingras 2015-06-29 10:46:05 -04:00
commit db7d7a9330
2 changed files with 8 additions and 0 deletions

View file

@ -249,6 +249,7 @@ class IAMBackend(BaseBackend):
for role in self.get_roles():
if role.name == role_name:
return role
raise BotoServerError(404, 'Not Found')
def get_roles(self):
return self.roles.values()