diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-12-07 11:15:23 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-01-03 10:53:48 -0800 |
commit | 10db9b3a50eae9c4c966f39f5beca8f5c17d441e (patch) | |
tree | 596bb3da0bcd1e2fe9a24e3a376fd6223cb6156f /lib/chef/provider/remote_file | |
parent | 94ba9c022e57feb2949e22656d811a843b3410f1 (diff) | |
download | chef-10db9b3a50eae9c4c966f39f5beca8f5c17d441e.tar.gz |
change HTTPServerException to HTTPClientException for ruby 2.6
includes backcompat for 2.5
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider/remote_file')
-rw-r--r-- | lib/chef/provider/remote_file/content.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/remote_file/content.rb b/lib/chef/provider/remote_file/content.rb index 4cf2c32287..b5f42749e7 100644 --- a/lib/chef/provider/remote_file/content.rb +++ b/lib/chef/provider/remote_file/content.rb @@ -54,7 +54,7 @@ class Chef as_uri(source) end raw_file = grab_file_from_uri(uri) - rescue SocketError, Errno::ECONNREFUSED, Errno::ENOENT, Errno::EACCES, Timeout::Error, Net::HTTPServerException, Net::HTTPFatalError, Net::FTPError, Errno::ETIMEDOUT => e + rescue SocketError, Errno::ECONNREFUSED, Errno::ENOENT, Errno::EACCES, Timeout::Error, Net::HTTPClientException, Net::HTTPFatalError, Net::FTPError, Errno::ETIMEDOUT => e logger.warn("#{@new_resource} cannot be downloaded from #{source}: #{e}") if source = sources.shift logger.info("#{@new_resource} trying to download from another mirror") |