From 0d854d8cf0fbd78b71ff83b7319282ef1d7309bd Mon Sep 17 00:00:00 2001 From: Stephen Benjamin Date: Thu, 6 Apr 2017 11:17:58 -0400 Subject: [PATCH] fixes #19196 - fix ruby 1.8.7 incompatability --- lib/smart_proxy_openscap/spool_forwarder.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/smart_proxy_openscap/spool_forwarder.rb b/lib/smart_proxy_openscap/spool_forwarder.rb index 1a3ddc8..9632d68 100644 --- a/lib/smart_proxy_openscap/spool_forwarder.rb +++ b/lib/smart_proxy_openscap/spool_forwarder.rb @@ -54,8 +54,9 @@ def forward_arf_file(cname, policy_id, date, arf_file_path) rescue OpenSCAP::OpenSCAPError => e logger.error "Failed to parse Arf Report at #{arf_file_path}, moving to #{Proxy::OpenSCAP::Plugin.settings.corrupted_dir}" - Proxy::OpenSCAP::StorageFS.new(Proxy::OpenSCAP::Plugin.settings.corrupted_dir, cname, policy_id, date) - .move_corrupted(arf_file_path.split('/').last) + Proxy::OpenSCAP::StorageFS.new(Proxy::OpenSCAP::Plugin.settings.corrupted_dir, cname, policy_id, date). + move_corrupted(arf_file_path.split('/').last) + rescue StandardError => e logger.error "smart-proxy-openscap-send failed to upload Compliance report for #{cname}, generated on #{Time.at date.to_i}. Cause: #{e}" end