Skip to content

Commit b2cf651

Browse files
committed
Fix security group list command
Security group list command tries to get a project list and this may fail with a multitude of exceptions including but not limited to 401, 404, ConnectionRefused and EndpointNotFound. Rather than try to capture every possibility, this patch just catches the base class. Converting project ids to names is less important than having a working security group list command. Change-Id: I68214d2680bad907f9d04ad3ca2f62cf3feee028 Closes-Bug: #1459629
1 parent cae03c6 commit b2cf651

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎openstackclient/compute/v2/security_group.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def _get_project(project_id):
161161
project_hash = {}
162162
try:
163163
projects = self.app.client_manager.identity.projects.list()
164-
except ksc_exc.Forbidden:
164+
except ksc_exc.ClientException:
165165
# This fails when the user is not an admin, just move along
166166
pass
167167
else:

0 commit comments

Comments
 (0)