From eff107b6821de4c9862d2240d101668001e22403 Mon Sep 17 00:00:00 2001 From: Gavin Mogan Date: Wed, 12 Sep 2012 17:57:12 -0700 Subject: [PATCH] My version of chef (10.12) throws ResourceNotFound error not ArgumentError, so trap both --- definitions/collectd_plugin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/definitions/collectd_plugin.rb b/definitions/collectd_plugin.rb index f4a4e89..75c665f 100644 --- a/definitions/collectd_plugin.rb +++ b/definitions/collectd_plugin.rb @@ -37,7 +37,7 @@ define :collectd_python_plugin, :options => {}, :module => nil, :path => nil do begin t = resources(:template => "/etc/collectd/plugins/python.conf") - rescue ArgumentError + rescue ArgumentError,Chef::Exceptions::ResourceNotFound collectd_plugin "python" do options :paths=>[node[:collectd][:plugin_dir]], :modules=>{} template "python_plugin.conf.erb"