diff options
author | drag00n <cmlucian@us.ibm.com> | 2015-01-13 15:17:47 -0500 |
---|---|---|
committer | Thom May <thom@chef.io> | 2016-02-16 11:24:01 +0000 |
commit | 357950127954094da7052e14edf887dbb7ed98de (patch) | |
tree | 2bccdda6532d29d9cac9b466acc16f6afda8f4a9 /lib/chef/http.rb | |
parent | 9a9e2b484ac3ac4c8497dd5e0cddff9c7c6c6dac (diff) | |
download | chef-357950127954094da7052e14edf887dbb7ed98de.tar.gz |
Make sure that we have a valid object before calling close!
This fixes [#2171](https://github.com/opscode/chef/issues/2171) when a
tempfile cannot be created or proper filesystem permissions do not
exist. This allows the proper exception to be thrown.
Diffstat (limited to 'lib/chef/http.rb')
-rw-r--r-- | lib/chef/http.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/http.rb b/lib/chef/http.rb index 9cd55f18dd..a3673ce281 100644 --- a/lib/chef/http.rb +++ b/lib/chef/http.rb @@ -406,7 +406,7 @@ class Chef tf.close tf rescue Exception - tf.close! + tf.close! if tf raise end |