Permalink
Browse files

My version of chef (10.12) throws ResourceNotFound error not Argument…

…Error, so trap both
  • Loading branch information...
1 parent 8073564 commit eff107b6821de4c9862d2240d101668001e22403 @halkeye halkeye committed Sep 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 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"

0 comments on commit eff107b

Please sign in to comment.