diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-03-15 09:24:06 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-03-15 09:24:06 -0700 |
commit | 4718a09e8ae5745ba9cffe2c357110e749499a8c (patch) | |
tree | d852e7822b88c95b95d2addf75d043925c56f569 /lib/chef/application | |
parent | 09df2d39c20eef68980af5551da72db533fdc047 (diff) | |
parent | c031a6182bef7f689b2d80f418ae1b80669168a3 (diff) | |
download | chef-4718a09e8ae5745ba9cffe2c357110e749499a8c.tar.gz |
Merge pull request #4707 from chef/lcg/useless-assignment
fix some UselessAssignment cases
Diffstat (limited to 'lib/chef/application')
-rw-r--r-- | lib/chef/application/apply.rb | 2 | ||||
-rw-r--r-- | lib/chef/application/windows_service.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/application/apply.rb b/lib/chef/application/apply.rb index 38b00f293c..03c86b86f2 100644 --- a/lib/chef/application/apply.rb +++ b/lib/chef/application/apply.rb @@ -204,7 +204,7 @@ class Chef::Application::Apply < Chef::Application parse_options run_chef_recipe Chef::Application.exit! "Exiting", 0 - rescue SystemExit => e + rescue SystemExit raise rescue Exception => e Chef::Application.debug_stacktrace(e) diff --git a/lib/chef/application/windows_service.rb b/lib/chef/application/windows_service.rb index 0328a65487..fca1ed3689 100644 --- a/lib/chef/application/windows_service.rb +++ b/lib/chef/application/windows_service.rb @@ -312,13 +312,13 @@ class Chef else ::File.open(config[:config_file]) { |f| apply_config(f.path) } end - rescue Errno::ENOENT => error + rescue Errno::ENOENT Chef::Log.warn("*****************************************") Chef::Log.warn("Did not find config file: #{config[:config_file]}, using command line options.") Chef::Log.warn("*****************************************") Chef::Config.merge!(config) - rescue SocketError => error + rescue SocketError Chef::Application.fatal!("Error getting config file #{Chef::Config[:config_file]}", 2) rescue Chef::Exceptions::ConfigurationError => error Chef::Application.fatal!("Error processing config file #{Chef::Config[:config_file]} with error #{error.message}", 2) |