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 <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2021-01-27 13:33:50 +08:00
parent 5cf5540250
commit 573c53a25d

View File

@ -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():")