]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
pybind/mgr/prometheus: catch ImportError
authorKefu Chai <kchai@redhat.com>
Tue, 24 Nov 2020 04:03:20 +0000 (12:03 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 25 Nov 2020 09:41:00 +0000 (17:41 +0800)
silences following warning from flake8

E722 do not use bare 'except'

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/prometheus/module.py

index f2abf00e4abbb01ad94b6669008e66cdbb832a7c..0c2fd00d82dc5bc01694efdbf9105379e5eee341 100644 (file)
@@ -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