From: Kefu Chai Date: Wed, 27 Jan 2021 05:33:50 +0000 (+0800) Subject: mgr/zabbix: do not catch exception with name X-Git-Tag: v17.1.0~3148^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=573c53a25d4a48220bc82e1d8ebdd689cb0838a5;p=ceph.git mgr/zabbix: do not catch exception with name silences flake8 warning of F841: https://www.flake8rules.com/rules/F841.html Signed-off-by: Kefu Chai --- diff --git a/src/pybind/mgr/zabbix/module.py b/src/pybind/mgr/zabbix/module.py index c4f19f38c8b2..b586de5e7b42 100644 --- a/src/pybind/mgr/zabbix/module.py +++ b/src/pybind/mgr/zabbix/module.py @@ -459,7 +459,7 @@ class Module(MgrModule): if discovery_counter == discovery_interval: try: self.discovery() - except Exception as exc: + except Exception: # Shouldn't happen, but let's log it and retry next interval, # rather than dying completely. self.log.exception("Unexpected error during discovery():") @@ -469,7 +469,7 @@ class Module(MgrModule): try: data = self.get_data() self.send(data) - except Exception as exc: + except Exception: # Shouldn't happen, but let's log it and retry next interval, # rather than dying completely. self.log.exception("Unexpected error during send():")