From c030f338ab37a5ce16de5b31006a278ac3767ca4 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Tue, 9 Aug 2016 12:24:46 -0700 Subject: autofixing Style/RedundantException cop --- lib/chef/cookbook/cookbook_version_loader.rb | 2 +- lib/chef/file_cache.rb | 2 +- lib/chef/util/dsc/configuration_generator.rb | 2 +- lib/chef/util/selinux.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/chef/cookbook/cookbook_version_loader.rb b/lib/chef/cookbook/cookbook_version_loader.rb index d9b027f322..cf72426740 100644 --- a/lib/chef/cookbook/cookbook_version_loader.rb +++ b/lib/chef/cookbook/cookbook_version_loader.rb @@ -168,7 +168,7 @@ class Chef when /\.json$/ apply_json_metadata(metadata_file) else - raise RuntimeError, "Invalid metadata file: #{metadata_file} for cookbook: #{cookbook_version}" + raise "Invalid metadata file: #{metadata_file} for cookbook: #{cookbook_version}" end end diff --git a/lib/chef/file_cache.rb b/lib/chef/file_cache.rb index cefc9da1eb..8e9bb1e3e4 100644 --- a/lib/chef/file_cache.rb +++ b/lib/chef/file_cache.rb @@ -85,7 +85,7 @@ class Chef File.join(create_cache_path(File.join(file_path_array), true), file_name) ) else - raise RuntimeError, "Cannot move #{file} to #{path}!" + raise "Cannot move #{file} to #{path}!" end end diff --git a/lib/chef/util/dsc/configuration_generator.rb b/lib/chef/util/dsc/configuration_generator.rb index 739a463ad5..8b492d483a 100644 --- a/lib/chef/util/dsc/configuration_generator.rb +++ b/lib/chef/util/dsc/configuration_generator.rb @@ -48,7 +48,7 @@ class Chef::Util::DSC configuration_document_location = find_configuration_document(configuration_name) if ! configuration_document_location - raise RuntimeError, "No DSC configuration for '#{configuration_name}' was generated from supplied DSC script" + raise "No DSC configuration for '#{configuration_name}' was generated from supplied DSC script" end configuration_document = get_configuration_document(configuration_document_location) diff --git a/lib/chef/util/selinux.rb b/lib/chef/util/selinux.rb index 1aac7eeeca..edca589034 100644 --- a/lib/chef/util/selinux.rb +++ b/lib/chef/util/selinux.rb @@ -78,7 +78,7 @@ class Chef when 0 return true else - raise RuntimeError, "Unknown exit code from command #{selinuxenabled_path}: #{cmd.exitstatus}" + raise "Unknown exit code from command #{selinuxenabled_path}: #{cmd.exitstatus}" end else # We assume selinux is not enabled if selinux utils are not -- cgit v1.2.1