From b2cf651100b2a6dc1b934b86390eff94ef9f8fdc Mon Sep 17 00:00:00 2001 From: TerryHowe Date: Thu, 28 May 2015 07:27:24 -0600 Subject: [PATCH] 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 --- openstackclient/compute/v2/security_group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstackclient/compute/v2/security_group.py b/openstackclient/compute/v2/security_group.py index d860bf808e..3dc9bae0b5 100644 --- a/openstackclient/compute/v2/security_group.py +++ b/openstackclient/compute/v2/security_group.py @@ -161,7 +161,7 @@ class ListSecurityGroup(lister.Lister): project_hash = {} try: projects = self.app.client_manager.identity.projects.list() - except ksc_exc.Forbidden: + except ksc_exc.ClientException: # This fails when the user is not an admin, just move along pass else: