From e76896046dcafe3832beb19927621225e9bdecb9 Mon Sep 17 00:00:00 2001 From: Samuel de Medeiros Queiroz Date: Mon, 4 Sep 2017 11:01:27 -0300 Subject: [PATCH] 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 --- shade/openstackcloud.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/shade/openstackcloud.py b/shade/openstackcloud.py index 64651d318..93a5595aa 100644 --- a/shade/openstackcloud.py +++ b/shade/openstackcloud.py @@ -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.