Skip to content

Instantly share code, notes, and snippets.

@rbm
Created February 23, 2011 02:56
Show Gist options
  • Save rbm/839912 to your computer and use it in GitHub Desktop.
Save rbm/839912 to your computer and use it in GitHub Desktop.
collectd_python_plugin patch
diff --git a/ataritech/collectd/definitions/collectd_plugin.rb b/ataritech/collectd/definitions/collectd_plugin.rb
index dd826e9..de8c0f6 100644
--- a/ataritech/collectd/definitions/collectd_plugin.rb
+++ b/ataritech/collectd/definitions/collectd_plugin.rb
@@ -37,7 +37,7 @@ end
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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment