Skip to content

Commit 875cacd

Browse files
keukopriteau
authored andcommitted
Fix cloudkitty exception handling from gnocchiclient
Probably due six removal, exception handling from gnocchiclient in cloudkitty is not working as expected. This patch fixing this issue. Bug described in storyboard: https://storyboard.openstack.org/#!/story/2008985 Story: 2008985 Task: 42635 Change-Id: I387fee79d277daa4c739297f1734dad1eaf4cc94 (cherry picked from commit 302f3c8)
1 parent 1e964bd commit 875cacd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cloudkitty/collector/gnocchi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def _fetch_metric(self, metric_name, start, end,
319319
# FIXME(peschk_l): gnocchiclient seems to be raising a BadRequest
320320
# when it should be raising MetricNotFound
321321
if isinstance(e, gexceptions.BadRequest):
322-
if 'Metrics not found' not in e.args[0]:
322+
if 'Metrics not found' not in e.message["cause"]:
323323
raise
324324
LOG.warning('[{scope}] Skipping this metric for the '
325325
'current cycle.'.format(scope=project_id, err=e))

0 commit comments

Comments
 (0)