Merge "Fix cloudkitty exception handling from gnocchiclient"

This commit is contained in:
Zuul 2021-07-08 11:32:09 +00:00 committed by Gerrit Code Review
commit 13c9df939b
1 changed files with 1 additions and 1 deletions

View File

@ -319,7 +319,7 @@ class GnocchiCollector(collector.BaseCollector):
# FIXME(peschk_l): gnocchiclient seems to be raising a BadRequest
# when it should be raising MetricNotFound
if isinstance(e, gexceptions.BadRequest):
if 'Metrics not found' not in e.args[0]:
if 'Metrics not found' not in e.message["cause"]:
raise
LOG.warning('[{scope}] Skipping this metric for the '
'current cycle.'.format(scope=project_id, err=e))