summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-01-04 21:24:20 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-01-04 21:24:20 +0000
commitbb72a08729b559b8b5a2c35509e2e20a6a605535 (patch)
tree58684674a0f237e7174bfb47e1f7ffd055007804
parent08a56cbd4430ecebeba0b28909e3a0616e9a0091 (diff)
downloadpuppet-bb72a08729b559b8b5a2c35509e2e20a6a605535.tar.gz
puppet-bb72a08729b559b8b5a2c35509e2e20a6a605535.tar.xz
puppet-bb72a08729b559b8b5a2c35509e2e20a6a605535.zip
Throwing warnings instead of exceptions when dpkg-query produces info we cannot understand
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2043 980ebf18-57e1-0310-9a29-db15c13687c0
-rwxr-xr-xlib/puppet/provider/package/dpkg.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/puppet/provider/package/dpkg.rb b/lib/puppet/provider/package/dpkg.rb
index 4b146c7d7..fbf0d1bf4 100755
--- a/lib/puppet/provider/package/dpkg.rb
+++ b/lib/puppet/provider/package/dpkg.rb
@@ -31,8 +31,8 @@ Puppet::Type.type(:package).provide :dpkg do
packages.push Puppet.type(:package).installedpkg(hash)
else
- raise Puppet::DevError,
- "Failed to match dpkg-query line %s" % line
+ Puppet.warning "Failed to match dpkg-query line %s" %
+ line.inspect
end
}
end
@@ -77,7 +77,9 @@ Puppet::Type.type(:package).provide :dpkg do
hash[field] = value
}
else
- raise Puppet::DevError, "Failed to handle dpkg-query output"
+ notice "Failed to handle dpkg-query line %s" % line.inspect
+ return {:ensure => :absent, :status => 'missing',
+ :name => @model[:name], :error => 'ok'}
end
if hash[:error] != "ok"