diff options
| author | TerryHowe <terrylhowe@gmail.com> | 2015-05-28 07:27:24 -0600 |
|---|---|---|
| committer | TerryHowe <terrylhowe@gmail.com> | 2015-06-02 08:55:54 -0600 |
| commit | b2cf651100b2a6dc1b934b86390eff94ef9f8fdc (patch) | |
| tree | 0a678a3e61bad3d37c923e91340bafaac783fba6 | |
| parent | cae03c6834baedd45d3962025a6168a70322df64 (diff) | |
| download | python-openstackclient-b2cf651100b2a6dc1b934b86390eff94ef9f8fdc.tar.gz | |
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
| -rw-r--r-- | openstackclient/compute/v2/security_group.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openstackclient/compute/v2/security_group.py b/openstackclient/compute/v2/security_group.py index d860bf80..3dc9bae0 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: |
