Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Trap ResourceNotFound error for collectd_python_plugin #5

Merged
merged 1 commit into from

2 participants

Gavin Mogan Noah Kantrowitz
Gavin Mogan

My version of chef (10.12) throws the resource not found error, not ArgumentError, so trapping both

Noah Kantrowitz coderanger merged commit 49fe544 into from
Dan Milon danmilon referenced this pull request
Open

release new version #26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 13, 2012
  1. Gavin Mogan
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  definitions/collectd_plugin.rb
2  definitions/collectd_plugin.rb
View
@@ -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"
Something went wrong with that request. Please try again.