From 5ef8a3e6eb81c7367f50c9de3ec10a8301b106d1 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Wed, 13 Feb 2008 17:38:00 -0600 Subject: Changing portage to use Puppet::Error instead of Puppet::PackageError, fixing #1059. --- lib/puppet/provider/package/portage.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/puppet/provider/package/portage.rb b/lib/puppet/provider/package/portage.rb index 03274a78d..dccfeaf56 100644 --- a/lib/puppet/provider/package/portage.rb +++ b/lib/puppet/provider/package/portage.rb @@ -39,7 +39,7 @@ Puppet::Type.type(:package).provide :portage, :parent => Puppet::Provider::Packa return packages rescue Puppet::ExecutionFailure => detail - raise Puppet::PackageError.new(detail) + raise Puppet::Error.new(detail) end end @@ -99,14 +99,14 @@ Puppet::Type.type(:package).provide :portage, :parent => Puppet::Provider::Packa case packages.size when 0 not_found_value = "%s/%s" % [@resource[:category] ? @resource[:category] : "", @resource[:name]] - raise Puppet::PackageError.new("No package found with the specified name [#{not_found_value}]") + raise Puppet::Error.new("No package found with the specified name [#{not_found_value}]") when 1 return packages[0] else - raise Puppet::PackageError.new("More than one package with the specified name [#{search_value}], please use the category parameter to disambiguate") + raise Puppet::Error.new("More than one package with the specified name [#{search_value}], please use the category parameter to disambiguate") end rescue Puppet::ExecutionFailure => detail - raise Puppet::PackageError.new(detail) + raise Puppet::Error.new(detail) end end -- cgit