From ac9d4e7de1b10293da89f2d1322127ea39a92bd0 Mon Sep 17 00:00:00 2001 From: Jon Cowie Date: Tue, 27 Feb 2018 13:34:11 +0000 Subject: Minor tweaks to fix things from code review Signed-off-by: Jon Cowie --- lib/chef/data_collector.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/chef/data_collector.rb b/lib/chef/data_collector.rb index e84390a901..dee25958c4 100644 --- a/lib/chef/data_collector.rb +++ b/lib/chef/data_collector.rb @@ -302,11 +302,9 @@ class Chef end def setup_http_output_locations - http_output_locations = {} - Chef::Config[:data_collector][:output_locations][:urls].each do |location_url| + Chef::Config[:data_collector][:output_locations][:urls].each_with_object({}) do |location_url,http_output_locations| http_output_locations[location_url] = setup_http_client(location_url) end - http_output_locations end # @@ -544,7 +542,7 @@ class Chef def validate_data_collector_output_locations! if data_collector_output_locations.empty? raise Chef::Exceptions::ConfigurationError, - "Chef::Config[:data_collector][:output_loations] is empty. Please supply an hash of valid URLs and / or local file paths." + "Chef::Config[:data_collector][:output_locations] is empty. Please supply an hash of valid URLs and / or local file paths." end data_collector_output_locations.each do |type, locations| -- cgit v1.2.1