summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Delano <stephen@opscode.com>2011-09-21 16:54:54 -0700
committerStephen Delano <stephen@opscode.com>2011-09-21 16:54:54 -0700
commit97bf57e0e45050eeebcff111bc14f948f3703f66 (patch)
tree4b99d3c4e8529ced216aaa6eb063f337749f8442
parente292b03f68d60a01ef0fac19e8ac33c586ab3f9f (diff)
downloadchef-97bf57e0e45050eeebcff111bc14f948f3703f66.tar.gz
don't hide exceptions by raising another one
-rw-r--r--chef/lib/chef/rest.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/chef/lib/chef/rest.rb b/chef/lib/chef/rest.rb
index cfb0843201..db1b031fd3 100644
--- a/chef/lib/chef/rest.rb
+++ b/chef/lib/chef/rest.rb
@@ -256,7 +256,7 @@ class Chef
tempfile = stream_to_tempfile(url, r, &block)
yield tempfile
ensure
- tempfile.close!
+ tempfile.close! if tempfile.respond_to?(:close!)
end
else
tempfile = stream_to_tempfile(url, r)