summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/configurer/plugin_handler.rb2
-rwxr-xr-xspec/unit/configurer/plugin_handler_spec.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/configurer/plugin_handler.rb b/lib/puppet/configurer/plugin_handler.rb
index 8192d4719..cfc6b5a0b 100644
--- a/lib/puppet/configurer/plugin_handler.rb
+++ b/lib/puppet/configurer/plugin_handler.rb
@@ -19,7 +19,7 @@ module Puppet::Configurer::PluginHandler
begin
Puppet.info "Loading downloaded plugin #{file}"
load file
- rescue StandardError, LoadError => detail
+ rescue Exception => detail
Puppet.err "Could not load downloaded file #{file}: #{detail}"
end
end
diff --git a/spec/unit/configurer/plugin_handler_spec.rb b/spec/unit/configurer/plugin_handler_spec.rb
index 1423ae4b5..30b135e8f 100755
--- a/spec/unit/configurer/plugin_handler_spec.rb
+++ b/spec/unit/configurer/plugin_handler_spec.rb
@@ -11,6 +11,10 @@ end
describe Puppet::Configurer::PluginHandler do
before do
@pluginhandler = PluginHandlerTester.new
+
+ # PluginHandler#load_plugin has an extra-strong rescue clause
+ # this mock is to make sure that we don't silently ignore errors
+ Puppet.expects(:err).never
end
it "should have a method for downloading plugins" do