bin/check-ceph.rb in sensu-plugins-ceph-0.0.5 vs bin/check-ceph.rb in sensu-plugins-ceph-1.0.0

- old
+ new

@@ -129,15 +129,15 @@ end def strip_warns(result) r = result.dup r.gsub!(/HEALTH_WARN\ /, '') - .gsub!(/\ ?flag\(s\) set/, '') - .gsub!(/\n/, '') + .gsub!(/\ ?flag\(s\) set/, '') + .delete!("\n") config[:ignore_flags].each do |f| r.gsub!(/,?#{f},?/, '') end - if r.length == 0 + if r.empty? result.gsub(/HEALTH_WARN/, 'HEALTH_OK') else result end end