]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/prometheus: don't store exception as e 38436/head
authorKen Dreyer <kdreyer@redhat.com>
Thu, 3 Dec 2020 17:48:06 +0000 (10:48 -0700)
committerKen Dreyer <kdreyer@redhat.com>
Thu, 3 Dec 2020 20:21:15 +0000 (13:21 -0700)
Python's logging module's exception() method will log the full exception
and stack trace for us, so we do not need to store the exception in the
"e" variable here.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
src/pybind/mgr/prometheus/module.py

index bfac1e5ab29d76a4ad8900b48c60cfc97ac103b7..71d451337d12411a67f2b9d9a1e817358518db9b 100644 (file)
@@ -200,7 +200,7 @@ class MetricCollectionThread(threading.Thread):
 
                 try:
                     data = self.mod.collect()
-                except Exception as e:
+                except:
                     # Log any issues encountered during the data collection and continue
                     self.mod.log.exception("failed to collect metrics:")
                     self.event.wait(self.mod.scrape_interval)