summaryrefslogtreecommitdiff
path: root/lib/chef/application
diff options
context:
space:
mode:
authorSteven Murawski <steven.murawski@gmail.com>2017-04-04 15:29:44 -0500
committerSteven Murawski <steven.murawski@gmail.com>2017-04-04 15:29:44 -0500
commitd08cbdaad788da3b9b1658717353f939361b3add (patch)
tree2316dacebcf1dd8c5c92a227f25335d4a3812997 /lib/chef/application
parent4b0926387418cd8d4105c125aebd23e68b612ff4 (diff)
downloadchef-d08cbdaad788da3b9b1658717353f939361b3add.tar.gz
removing the use of Chef::Exception::DeprecatedExitCodesmurawski/exit_status_default
Signed-off-by: Steven Murawski <steven.murawski@gmail.com>
Diffstat (limited to 'lib/chef/application')
-rw-r--r--lib/chef/application/exit_code.rb10
-rw-r--r--lib/chef/application/windows_service.rb6
2 files changed, 4 insertions, 12 deletions
diff --git a/lib/chef/application/exit_code.rb b/lib/chef/application/exit_code.rb
index 246c95380b..917aa16e62 100644
--- a/lib/chef/application/exit_code.rb
+++ b/lib/chef/application/exit_code.rb
@@ -72,8 +72,6 @@ class Chef
VALID_RFC_062_EXIT_CODES[:SIGINT_RECEIVED]
elsif sigterm_received?(exception)
VALID_RFC_062_EXIT_CODES[:SIGTERM_RECEIVED]
- elsif legacy_exit_code?(exception)
- VALID_RFC_062_EXIT_CODES[:GENERIC_FAILURE]
elsif reboot_scheduled?(exception)
VALID_RFC_062_EXIT_CODES[:REBOOT_SCHEDULED]
elsif reboot_needed?(exception)
@@ -89,12 +87,6 @@ class Chef
end
end
- def legacy_exit_code?(exception)
- resolve_exception_array(exception).any? do |e|
- e.is_a? Chef::Exceptions::DeprecatedExitCode
- end
- end
-
def reboot_scheduled?(exception)
resolve_exception_array(exception).any? do |e|
e.is_a? Chef::Exceptions::Reboot
@@ -162,7 +154,7 @@ class Chef
"Chef attempted to exit with a non-standard exit code of #{exit_code}." \
" Chef RFC 062 (https://github.com/chef/chef-rfc/blob/master/rfc062-exit-status.md) defines the" \
" exit codes that should be used with Chef. Chef::Application::ExitCode defines valid exit codes" \
- " Non-standard exit codes are redefined as GENERIC_FAILURE."
+ " Non-standard exit codes are redefined as GENERIC_FAILURE."
end
end
diff --git a/lib/chef/application/windows_service.rb b/lib/chef/application/windows_service.rb
index 7bc68a586d..c30f5d1fe8 100644
--- a/lib/chef/application/windows_service.rb
+++ b/lib/chef/application/windows_service.rb
@@ -318,11 +318,11 @@ class Chef
Chef::Config.merge!(config)
rescue SocketError
- Chef::Application.fatal!("Error getting config file #{Chef::Config[:config_file]}", Chef::Exceptions::DeprecatedExitCode.new)
+ Chef::Application.fatal!("Error getting config file #{Chef::Config[:config_file]}")
rescue Chef::Exceptions::ConfigurationError => error
- Chef::Application.fatal!("Error processing config file #{Chef::Config[:config_file]} with error #{error.message}", Chef::Exceptions::DeprecatedExitCode.new)
+ Chef::Application.fatal!("Error processing config file #{Chef::Config[:config_file]} with error #{error.message}")
rescue Exception => error
- Chef::Application.fatal!("Unknown error processing config file #{Chef::Config[:config_file]} with error #{error.message}", Chef::Exceptions::DeprecatedExitCode.new)
+ Chef::Application.fatal!("Unknown error processing config file #{Chef::Config[:config_file]} with error #{error.message}")
end
end