diff options
author | Pete Higgins <pete@peterhiggins.org> | 2020-07-27 16:46:46 -0700 |
---|---|---|
committer | Pete Higgins <pete@peterhiggins.org> | 2020-07-27 16:52:54 -0700 |
commit | 09cdc96cb25956b3ef053fbe093d06453a7af92b (patch) | |
tree | 124a9fe7ece206b0955ff0c893b8c9d6d6b79f45 /lib/chef/http.rb | |
parent | 042ae378e449bb0499fdec015a374b859b9fc5b0 (diff) | |
download | chef-09cdc96cb25956b3ef053fbe093d06453a7af92b.tar.gz |
Fix NoMethodError when server returns a 406.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
Diffstat (limited to 'lib/chef/http.rb')
-rw-r--r-- | lib/chef/http.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/chef/http.rb b/lib/chef/http.rb index 1777739a93..eed2a41815 100644 --- a/lib/chef/http.rb +++ b/lib/chef/http.rb @@ -58,7 +58,6 @@ class Chef handler.handle_chunk(chunk) end end - end def self.middlewares @@ -471,7 +470,11 @@ class Chef end def version_retries - @version_retries ||= options[:version_class].possible_requests + @version_retries ||= if options[:version_class] + options[:version_class].possible_requests + else + 0 + end end # @api private |