diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-11-15 15:03:32 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-12-06 13:08:26 -0800 |
commit | db85ca494a484024404f1090c493613cc9521662 (patch) | |
tree | cc655fce7e3bfaa450a697889f2e8f2e5c80d38d /lib/chef/data_collector | |
parent | d218f942628da9a7302f1cc166abec0ea4fdeba2 (diff) | |
download | chef-db85ca494a484024404f1090c493613cc9521662.tar.gz |
fix Style/MultilineIfModifier
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/data_collector')
-rw-r--r-- | lib/chef/data_collector/messages.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/chef/data_collector/messages.rb b/lib/chef/data_collector/messages.rb index f63242f85e..c0683534a9 100644 --- a/lib/chef/data_collector/messages.rb +++ b/lib/chef/data_collector/messages.rb @@ -82,12 +82,14 @@ class Chef "deprecations" => reporter_data[:deprecations], } - message["error"] = { - "class" => run_status.exception.class, - "message" => run_status.exception.message, - "backtrace" => run_status.exception.backtrace, - "description" => reporter_data[:error_descriptions], - } if run_status.exception + if run_status.exception + message["error"] = { + "class" => run_status.exception.class, + "message" => run_status.exception.message, + "backtrace" => run_status.exception.backtrace, + "description" => reporter_data[:error_descriptions], + } + end message end |