Remove improper exc handling in is_user_in_group

Since we are already catching the expected exceptions for that operation
there is no need to catch Exception in that method. Also, the message
was saying "error in adding user to group", but that method is just
checking ...

Change-Id: I3b6fb28773a6c52b223bca4964dba4ccc27f9787
This commit is contained in:
Samuel de Medeiros Queiroz 2017-09-04 11:01:27 -03:00
parent e42192e839
commit e76896046d

View File

@ -1123,11 +1123,6 @@ class OpenStackCloud(
# NOTE(samueldmq): knowing this URI exists, let's interpret this as
# user not found in group rather than URI not found.
return False
except Exception as e:
raise OpenStackCloudException(
"Error adding user {user} to group {group}: {err}".format(
user=name_or_id, group=group_name_or_id, err=str(e))
)
def remove_user_from_group(self, name_or_id, group_name_or_id):
"""Remove a user from a group.