]> 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)
committerPere Diaz Bou <pdiazbou@redhat.com>
Tue, 26 Apr 2022 08:50:11 +0000 (10:50 +0200)
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
monitoring/ceph-mixin/tests_dashboards/util.py

index e52a36469e2c9f025e45d5e157817dd1d8a086b7..f9295704b472402a70ca03e10e98603361eebdf4 100644 (file)
@@ -42,7 +42,6 @@ def add_dashboard_queries(data: Dict[str, Any], dashboard_data: Dict[str, Any],
     if 'panels' not in dashboard_data:
         return
     error = 0
-    dashboard_title = dashboard_data['title']
     for panel in dashboard_data['panels']:
         if (
                 'title' in panel
@@ -67,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('Missing legend_format in queries, please add a proper value.')
 
 
 def add_dashboard_variables(data: Dict[str, Any], dashboard_data: Dict[str, Any]) -> None: