From e8f3103cc14b62226a5d71d2018b8e1c96c8a2d8 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Thu, 11 May 2017 08:46:32 -0500 Subject: 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 --- openstackclient/common/quota.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'openstackclient/common') 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 -- cgit v1.2.1