summaryrefslogtreecommitdiff
path: root/lib/chef/audit
diff options
context:
space:
mode:
authortyler-ball <tyleraball@gmail.com>2014-12-29 15:13:51 -0800
committertyler-ball <tyleraball@gmail.com>2014-12-29 15:13:51 -0800
commitc1676b32aa08b618f4c2317676f5590388b3bc53 (patch)
treed049236793b5ce8ade14f594218eac917ed31291 /lib/chef/audit
parent43eba1778fab8bc440f97824af7227476457a65c (diff)
downloadchef-c1676b32aa08b618f4c2317676f5590388b3bc53.tar.gz
Updating for review comments
Diffstat (limited to 'lib/chef/audit')
-rw-r--r--lib/chef/audit/audit_reporter.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/chef/audit/audit_reporter.rb b/lib/chef/audit/audit_reporter.rb
index 596b06b285..a5dd9a6c48 100644
--- a/lib/chef/audit/audit_reporter.rb
+++ b/lib/chef/audit/audit_reporter.rb
@@ -127,11 +127,9 @@ class Chef
rest_client.post(audit_url, run_data, headers)
rescue StandardError => e
if e.respond_to? :response
- code = e.response.code.nil? ? "Exception Code Empty" : e.response.code
-
# 404 error code is OK. This means the version of server we're running against doesn't support
# audit reporting. Don't alarm failure in this case.
- if code == "404"
+ if e.response.code == "404"
Chef::Log.debug("Server doesn't support audit reporting. Skipping report.")
return
else