diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2017-05-11 08:46:32 -0500 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2017-05-11 08:47:37 -0500 |
| commit | e8f3103cc14b62226a5d71d2018b8e1c96c8a2d8 (patch) | |
| tree | 1863044c357c2a9363459a6b4dee7af2032f0f63 /openstackclient/common | |
| parent | c69304e3d365dc2c67fab298eba0b9097d3819da (diff) | |
| download | python-openstackclient-e8f3103cc14b62226a5d71d2018b8e1c96c8a2d8.tar.gz | |
Ignore more exceptions in quota list
Additional exceptions can be thrown here, ignore additional project
lookup exceptions, but still not all. Server failures are still
interesting, for example.
Change-Id: I9a750ae8e8efa29a36bbd1e34b50b6ace0658260
Diffstat (limited to 'openstackclient/common')
| -rw-r--r-- | openstackclient/common/quota.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/openstackclient/common/quota.py b/openstackclient/common/quota.py index 6ed9e370..0d5cb9be 100644 --- a/openstackclient/common/quota.py +++ b/openstackclient/common/quota.py @@ -135,7 +135,10 @@ class ListQuota(command.Lister): try: data = compute_client.quotas.get(p) except Exception as ex: - if type(ex).__name__ == 'NotFound': + if ( + type(ex).__name__ == 'NotFound' or + ex.http_status >= 400 and ex.http_status <= 499 + ): # Project not found, move on to next one LOG.warning("Project %s not found: %s" % (p, ex)) continue |
