Did you find that Puppet.warning actually emits anything when used in
defaults.rb though Luke?

The patch I was going to propose when I get back to my main computer
is one where I have to set up a new logging destination to the console
before trying to use a warning, and I wasn't sure whether it was worth
doing this earlier in the process than just within a specific hook
within a specific setting....



On Sun, Aug 2, 2009 at 1:53 PM, Luke Kanies<[email protected]> wrote:
>
> No tests, because this is a load order problem and is essentially
> impossible to write a test for.  I've verified it, though.
>
> Signed-off-by: Luke Kanies <[email protected]>
> ---
>  lib/puppet/util/log.rb |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/lib/puppet/util/log.rb b/lib/puppet/util/log.rb
> index 6edc7f4..305bd2f 100644
> --- a/lib/puppet/util/log.rb
> +++ b/lib/puppet/util/log.rb
> @@ -514,7 +514,7 @@ class Puppet::Util::Log
>         # We can't store the actual source, we just store the path.
>         # We can't just check for whether it responds to :path, because
>         # plenty of providers respond to that in their normal function.
> -        if (source.is_a?(Puppet::Type) or source.is_a?(Puppet::Parameter)) 
> and source.respond_to?(:path)
> +        if defined?(Puppet::Type) and (source.is_a?(Puppet::Type) or 
> source.is_a?(Puppet::Parameter)) and source.respond_to?(:path)
>             @source = source.path
>         else
>             @source = source.to_s
> --
> 1.6.1
>
>
> >
>



-- 
Nigel Kersten
[email protected]
System Administrator
Google, Inc.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to