Skip to content

Commit

Permalink
Merge pull request #265 from chef/tm/fix_chefstyle
Browse files Browse the repository at this point in the history
chefstyle fixes
  • Loading branch information
thommay authored Apr 10, 2017
2 parents 60042e5 + b4101a4 commit 8d3a43f
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions lib/chef-vault/actor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,16 @@ def get_admin_key
end

def get_client_key
begin
get_key("clients")
rescue Net::HTTPServerException => http_error
if http_error.response.code.eql?("403")
print_forbidden_error
raise http_error
elsif http_error.response.code.eql?("404")
raise ChefVault::Exceptions::ClientNotFound,
"#{name} is not a valid chef client and/or node"
else
raise http_error
end
get_key("clients")
rescue Net::HTTPServerException => http_error
if http_error.response.code.eql?("403")
print_forbidden_error
raise http_error
elsif http_error.response.code.eql?("404")
raise ChefVault::Exceptions::ClientNotFound,
"#{name} is not a valid chef client and/or node"
else
raise http_error
end
end

Expand Down

0 comments on commit 8d3a43f

Please sign in to comment.