summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorBryan Kearney <bkearney@redhat.com>2010-03-17 08:56:36 -0400
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commitdfb80825b1494601022dfd711f1266f884e721aa (patch)
treeb2eb1ffa9aaca609d98e38050f1dc1101a42faad /lib/puppet
parent6e16ea17413b46a149972da4690a0d6d7f7d7013 (diff)
downloadpuppet-dfb80825b1494601022dfd711f1266f884e721aa.tar.gz
puppet-dfb80825b1494601022dfd711f1266f884e721aa.tar.xz
puppet-dfb80825b1494601022dfd711f1266f884e721aa.zip
Fixed the return types were valid, and removed the copy paste error with the exception logic
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/provider/augeas/augeas.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/provider/augeas/augeas.rb b/lib/puppet/provider/augeas/augeas.rb
index 7a7d55de1..0f1503a2f 100644
--- a/lib/puppet/provider/augeas/augeas.rb
+++ b/lib/puppet/provider/augeas/augeas.rb
@@ -331,15 +331,15 @@ Puppet::Type.type(:augeas).provide(:augeas) do
when "set"
debug("sending command '#{command}' with params #{cmd_array.inspect}")
rv = aug.set(cmd_array[0], cmd_array[1])
- fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}") if (rv)
+ fail("Error sending command '#{command}' with params #{cmd_array.inspect}") if (!rv)
when "rm", "remove"
debug("sending command '#{command}' with params #{cmd_array.inspect}")
rv = aug.rm(cmd_array[0])
- fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}") if (rv)
+ fail("Error sending command '#{command}' with params #{cmd_array.inspect}") if (rv == -1)
when "clear"
debug("sending command '#{command}' with params #{cmd_array.inspect}")
rv = aug.clear(cmd_array[0])
- fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}") if (rv == -1)
+ fail("Error sending command '#{command}' with params #{cmd_array.inspect}") if (!rv)
when "insert", "ins"
label = cmd_array[0]
where = cmd_array[1]
@@ -351,7 +351,7 @@ Puppet::Type.type(:augeas).provide(:augeas) do
end
debug("sending command '#{command}' with params #{[label, where, path].inspect}")
rv = aug.insert(path, label, before)
- fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}") if (rv == -1)
+ fail("Error sending command '#{command}' with params #{cmd_array.inspect}") if (rv == -1)
else fail("Command '#{command}' is not supported")
end
rescue SystemExit,NoMemoryError