Skip to content
This repository was archived by the owner on Dec 31, 2021. It is now read-only.

Trap ResourceNotFound error for collectd_python_plugin #5

Merged
merged 1 commit into from
Sep 13, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion definitions/collectd_plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down