]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/zabbix: do not catch exception with name
authorKefu Chai <kchai@redhat.com>
Wed, 27 Jan 2021 05:33:50 +0000 (13:33 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 27 Jan 2021 11:22:05 +0000 (19:22 +0800)
silences flake8 warning of F841:
https://www.flake8rules.com/rules/F841.html

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

index c4f19f38c8b2030dc012afd137a390dbf97a8ea1..b586de5e7b42b398a8d8b4807c776cf1d5cc0967 100644 (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():")