summaryrefslogtreecommitdiff
path: root/lib/chef/application/exit_code.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2021-12-26 18:58:08 -0800
committerTim Smith <tsmith84@gmail.com>2021-12-26 18:58:08 -0800
commit96bf96d83cdc799d22ef9e96f4dbc14dc35bebed (patch)
tree4d2ca22e634dcba7de1e275df5b9bab9211b348b /lib/chef/application/exit_code.rb
parent50a0001bae754c66feb69c84b64cb305a03a34d2 (diff)
downloadchef-Performance_RedundantEqualityComparisonBlock.tar.gz
Resolve all Performance/RedundantEqualityComparisonBlock warningsPerformance_RedundantEqualityComparisonBlock
I'm confused how this works with classes, but :shrug: Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/application/exit_code.rb')
-rw-r--r--lib/chef/application/exit_code.rb28
1 files changed, 7 insertions, 21 deletions
diff --git a/lib/chef/application/exit_code.rb b/lib/chef/application/exit_code.rb
index 26c181fa3d..4cc579e83a 100644
--- a/lib/chef/application/exit_code.rb
+++ b/lib/chef/application/exit_code.rb
@@ -90,45 +90,31 @@ class Chef
end
def reboot_scheduled?(exception)
- resolve_exception_array(exception).any? do |e|
- e.is_a? Chef::Exceptions::Reboot
- end
+ resolve_exception_array(exception).any?(Chef::Exceptions::Reboot)
end
def reboot_needed?(exception)
- resolve_exception_array(exception).any? do |e|
- e.is_a? Chef::Exceptions::RebootPending
- end
+ resolve_exception_array(exception).any?(Chef::Exceptions::RebootPending)
end
def reboot_failed?(exception)
- resolve_exception_array(exception).any? do |e|
- e.is_a? Chef::Exceptions::RebootFailed
- end
+ resolve_exception_array(exception).any?(Chef::Exceptions::RebootFailed)
end
def configuration_failure?(exception)
- resolve_exception_array(exception).any? do |e|
- e.is_a? Chef::Exceptions::ConfigurationError
- end
+ resolve_exception_array(exception).any?(Chef::Exceptions::ConfigurationError)
end
def client_upgraded?(exception)
- resolve_exception_array(exception).any? do |e|
- e.is_a? Chef::Exceptions::ClientUpgraded
- end
+ resolve_exception_array(exception).any?(Chef::Exceptions::ClientUpgraded)
end
def sigint_received?(exception)
- resolve_exception_array(exception).any? do |e|
- e.is_a? Chef::Exceptions::SigInt
- end
+ resolve_exception_array(exception).any?(Chef::Exceptions::SigInt)
end
def sigterm_received?(exception)
- resolve_exception_array(exception).any? do |e|
- e.is_a? Chef::Exceptions::SigTerm
- end
+ resolve_exception_array(exception).any?(Chef::Exceptions::SigTerm)
end
def resolve_exception_array(exception)