]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
monitoring/grafana: ValueError instead of RuntimeError
authorPere Diaz Bou <pdiazbou@redhat.com>
Thu, 16 Dec 2021 14:31:28 +0000 (15:31 +0100)
committerErnesto Puerta <epuertat@redhat.com>
Fri, 28 Jan 2022 11:48:00 +0000 (12:48 +0100)
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
(cherry picked from commit b381a83e9bcde79c0695906e749c7b758faff674)

monitoring/grafana/dashboards/tests/util.py

index 1b7e1ac265df32a26c091830ab952b3db763865a..88337728e80e1ec8e8a4b325c9e6b59bdcdb3265 100644 (file)
@@ -66,7 +66,7 @@ def add_dashboard_queries(data: Dict[str, Any], dashboard_data: Dict[str, Any],
                 data['queries'][query_id] = {'query': target['expr'], 'path': path}
                 data['stats'][path]['total'] += 1
     if error:
-        raise RuntimeError(f'Missing legend_format in queries, please add a proper value.')
+        raise ValueError(f'Missing legend_format in queries, please add a proper value.')
 
 
 def add_dashboard_variables(data: Dict[str, Any], dashboard_data: Dict[str, Any]) -> None: