[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5
Daniel Pittman
daniel at puppetlabs.com
Tue May 10 08:10:43 UTC 2011
The following commit has been merged in the experimental branch:
commit 3d88808270e9a0cb848a66825c66676598559dc3
Author: Daniel Pittman <daniel at puppetlabs.com>
Date: Thu Mar 31 16:46:43 2011 -0700
(#6749) base indirector string should fail on invalid terminus.
We used to generate an info-level message, then carry on, which typically
resulted in raising because 'nil' doesn't implement the expected method that
we immediately try to call.
So, instead, raise a clear error at the time we fail to load, which gives a
pleasant rather than confusing error to the user. Which at least means they
know why things have gone wrong...
Reviewed-By: Pieter van de Bruggen <pieter at puppetlabs.com>
diff --git a/lib/puppet/string/indirector.rb b/lib/puppet/string/indirector.rb
index 71b1f3b..0f5f405 100644
--- a/lib/puppet/string/indirector.rb
+++ b/lib/puppet/string/indirector.rb
@@ -59,7 +59,8 @@ that we should describe in this file somehow."
# One usually does.
def indirection
unless @indirection
- Puppet.info("Could not find terminus for #{indirection_name}") unless @indirection = Puppet::Indirector::Indirection.instance(indirection_name)
+ @indirection = Puppet::Indirector::Indirection.instance(indirection_name)
+ @indirection or raise "Could not find terminus for #{indirection_name}"
end
@indirection
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list