From e700ed807c4b2a43a77b7e13939e1e04a8ac856b Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 24 Nov 2020 12:03:20 +0800 Subject: [PATCH] pybind/mgr/prometheus: catch ImportError silences following warning from flake8 E722 do not use bare 'except' Signed-off-by: Kefu Chai --- src/pybind/mgr/prometheus/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index f2abf00e4ab..0c2fd00d82d 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -14,7 +14,7 @@ from rbd import RBD from collections import namedtuple try: from typing import Optional, Dict, Any, Set -except: +except ImportError: pass # Defaults for the Prometheus HTTP server. Can also set in config-key -- 2.39.5