summaryrefslogtreecommitdiff
path: root/lib/chef/http.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-12-07 11:15:23 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2019-01-03 10:53:48 -0800
commit10db9b3a50eae9c4c966f39f5beca8f5c17d441e (patch)
tree596bb3da0bcd1e2fe9a24e3a376fd6223cb6156f /lib/chef/http.rb
parent94ba9c022e57feb2949e22656d811a843b3410f1 (diff)
downloadchef-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/http.rb')
-rw-r--r--lib/chef/http.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/http.rb b/lib/chef/http.rb
index 3f815b9eff..e9f94e6c92 100644
--- a/lib/chef/http.rb
+++ b/lib/chef/http.rb
@@ -152,7 +152,7 @@ class Chef
response.error! unless success_response?(response)
return_value
- rescue Net::HTTPServerException => e
+ rescue Net::HTTPClientException => e
http_attempts += 1
response = e.response
if response.kind_of?(Net::HTTPNotAcceptable) && version_retries - http_attempts > 0
@@ -190,7 +190,7 @@ class Chef
response.error!
end
tempfile
- rescue Net::HTTPServerException => e
+ rescue Net::HTTPClientException => e
http_attempts += 1
response = e.response
if response.kind_of?(Net::HTTPNotAcceptable) && version_retries - http_attempts > 0
@@ -245,7 +245,7 @@ class Chef
end
end
tempfile
- rescue Net::HTTPServerException => e
+ rescue Net::HTTPClientException => e
http_attempts += 1
response = e.response
if response.kind_of?(Net::HTTPNotAcceptable) && version_retries - http_attempts > 0