summaryrefslogtreecommitdiff
path: root/lib/chef/application/exit_code.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-02-13 09:52:10 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2017-02-13 09:52:10 -0800
commit404a9bc88be538769c6c80b3b31f39a6582991d2 (patch)
tree2f8795e5f64153440c22a522d669c235a627f289 /lib/chef/application/exit_code.rb
parentb949a48acc21d4b64869bd7b834708d5232b1f2a (diff)
downloadchef-404a9bc88be538769c6c80b3b31f39a6582991d2.tar.gz
fix specs: RedundantReturn, RedundantSelf, RedundantBegin
department of redundancy department Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/application/exit_code.rb')
-rw-r--r--lib/chef/application/exit_code.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/chef/application/exit_code.rb b/lib/chef/application/exit_code.rb
index 2c1298cf91..610a356a7c 100644
--- a/lib/chef/application/exit_code.rb
+++ b/lib/chef/application/exit_code.rb
@@ -198,12 +198,10 @@ class Chef
end
def notify_on_deprecation(message)
- begin
- Chef.deprecated(:exit_code, message)
- rescue Chef::Exceptions::DeprecatedFeatureError
+ Chef.deprecated(:exit_code, message)
+ rescue Chef::Exceptions::DeprecatedFeatureError
# Have to rescue this, otherwise this unhandled error preempts
# the current exit code assignment.
- end
end
def deprecation_warning
@@ -222,7 +220,7 @@ class Chef
def default_exit_code
if normalization_disabled? || normalization_not_configured?
- return DEPRECATED_RFC_062_EXIT_CODES[:DEPRECATED_FAILURE]
+ DEPRECATED_RFC_062_EXIT_CODES[:DEPRECATED_FAILURE]
else
VALID_RFC_062_EXIT_CODES[:GENERIC_FAILURE]
end