summaryrefslogtreecommitdiff
path: root/lib/chef/http
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-03-14 12:54:35 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-03-14 12:54:35 -0700
commit811abf7591844ef3229c5705e221cbf1e7ea3cd1 (patch)
treeb0f0d6a87e2330916dce134904ba84b4fcaf0a00 /lib/chef/http
parentab827c15c14429d55064e1978df4c17e20e123ad (diff)
downloadchef-811abf7591844ef3229c5705e221cbf1e7ea3cd1.tar.gz
manual fixing for raise unless
Diffstat (limited to 'lib/chef/http')
-rw-r--r--lib/chef/http/socketless_chef_zero_client.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/http/socketless_chef_zero_client.rb b/lib/chef/http/socketless_chef_zero_client.rb
index 9d5be78a57..1acac5e758 100644
--- a/lib/chef/http/socketless_chef_zero_client.rb
+++ b/lib/chef/http/socketless_chef_zero_client.rb
@@ -177,7 +177,8 @@ class Chef
def to_net_http(code, headers, chunked_body)
body = chunked_body.join("")
- (msg = STATUS_MESSAGE[code]) || raise("Cannot determine HTTP status message for code #{code}")
+ msg = STATUS_MESSAGE[code]
+ raise "Cannot determine HTTP status message for code #{code}" unless msg
response = Net::HTTPResponse.send(:response_class, code.to_s).new("1.0", code.to_s, msg)
response.instance_variable_set(:@body, body)
headers.each do |name, value|