From: Kefu Chai Date: Wed, 10 Feb 2021 07:52:06 +0000 (+0800) Subject: mgr/alerts: add alerts to flake8 test X-Git-Tag: v17.1.0~2944^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F39391%2Fhead;p=ceph.git mgr/alerts: add alerts to flake8 test Signed-off-by: Kefu Chai --- diff --git a/src/pybind/mgr/alerts/__init__.py b/src/pybind/mgr/alerts/__init__.py index e4c185ca95e3..f2f1d781b455 100644 --- a/src/pybind/mgr/alerts/__init__.py +++ b/src/pybind/mgr/alerts/__init__.py @@ -1 +1,2 @@ +# flake8: noqa from .module import Alerts diff --git a/src/pybind/mgr/alerts/module.py b/src/pybind/mgr/alerts/module.py index 6800e114fa15..296bcf9381da 100644 --- a/src/pybind/mgr/alerts/module.py +++ b/src/pybind/mgr/alerts/module.py @@ -127,8 +127,8 @@ class Alerts(MgrModule): if 'new' not in d: d['new'] = {} d['new'][code] = alert - elif (alert['summary'].get('count', 0) > - last['checks'][code]['summary'].get('count', 0)): + elif (alert['summary'].get('count', 0) + > last['checks'][code]['summary'].get('count', 0)): if 'updated' not in d: d['updated'] = {} d['updated'][code] = alert diff --git a/src/pybind/mgr/tox.ini b/src/pybind/mgr/tox.ini index 36c9ef9eec64..c554de29f890 100644 --- a/src/pybind/mgr/tox.ini +++ b/src/pybind/mgr/tox.ini @@ -115,6 +115,7 @@ basepython = python3 deps = flake8 modules = + alerts balancer cephadm crash