From f9fd4ebf7dabd6d7573987f8b4b830cd5029068b Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Mon, 11 May 2020 13:37:52 +0200 Subject: [PATCH] L #-: disable SuppressedException --- src/im_mad/remotes/node-probes.d/monitor_ds.rb | 4 +++- src/im_mad/remotes/node-probes.d/monitor_ds_vm.rb | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/im_mad/remotes/node-probes.d/monitor_ds.rb b/src/im_mad/remotes/node-probes.d/monitor_ds.rb index 673d27194b..31b12e8fea 100755 --- a/src/im_mad/remotes/node-probes.d/monitor_ds.rb +++ b/src/im_mad/remotes/node-probes.d/monitor_ds.rb @@ -23,10 +23,12 @@ require 'fileutils' class DSMonitor def initialize(config) + # rubocop:disable Lint/SuppressedException begin @ds_location = config.elements['DATASTORE_LOCATION'].text.to_s - rescue + rescue StandardError end + # rubocop:enable Lint/SuppressedException @ds_location ||= '/var/lib/one/datastores' diff --git a/src/im_mad/remotes/node-probes.d/monitor_ds_vm.rb b/src/im_mad/remotes/node-probes.d/monitor_ds_vm.rb index fd134ee79b..33b4be982e 100755 --- a/src/im_mad/remotes/node-probes.d/monitor_ds_vm.rb +++ b/src/im_mad/remotes/node-probes.d/monitor_ds_vm.rb @@ -27,10 +27,12 @@ rescue StandardError => e exit(-1) end +# rubocop:disable Lint/SuppressedException begin ds_location = config.elements['DATASTORE_LOCATION'].text.to_s -rescue +rescue StandardError end +# rubocop:enable Lint/SuppressedException ds_location ||= '/var/lib/one/datastores'