On Tue, Mar 1, 2011 at 23:08, James Turnbull <[email protected]> wrote:

> --- a/lib/puppet/application/kick.rb
> +++ b/lib/puppet/application/kick.rb
> @@ -104,7 +104,7 @@ class Puppet::Application::Kick < Puppet::Application
>       out = %x{ping -c 1 #{host}}
>       unless $CHILD_STATUS == 0
>         $stderr.print "Could not contact #{host}\n"
> -        next
> +        exit($CHILD_STATUS)
>       end
>     end

It isn't clear to me that this is a safe change.  I /think/ it is,
looking at the code, but it would be good to confirm that this does
the right thing without semantic changes?


> diff --git a/lib/puppet/util/log/destinations.rb 
> b/lib/puppet/util/log/destinations.rb
> index c70edeb..4c0b4dc 100644
> --- a/lib/puppet/util/log/destinations.rb
> +++ b/lib/puppet/util/log/destinations.rb
> @@ -96,7 +96,7 @@ Puppet::Util::Log.newdesttype :console do
>   HWHITE  = {:console => " [1;37m", :html => "FFFFFF"}
>   RESET   = {:console => " [0m",    :html => ""      }
>
> -  @@colormap = {
> +  Colormap = {
>     :debug => WHITE,
>     :info => GREEN,
>     :notice => CYAN,
> @@ -117,11 +117,11 @@ Puppet::Util::Log.newdesttype :console do
>   end
>
>   def console_color(level, str)
> -    @@colormap[level][:console] + str + RESET[:console]
> +    Colormap[level][:console] + str + RESET[:console]
>   end
>
>   def html_color(level, str)
> -    %{<span style="color: %s">%s</span>} % [@@colormap[level][:html], str]
> +    %{<span style="color: %s">%s</span>} % [Colormap[level][:html], str]
>   end

This change looks good to me.  We never wrote that class variable, so
it was already an effective constant, so happy to see that part land.

I would kind of prefer to see the two changes as separate commits in a
single branch, to make them easier to revert individually if we
discover problems with them later.  (git can automate a single commit
revert; we need human effort to revert a mixed patch.)

Thanks,
    Daniel
-- 
⎋ Puppet Labs Developer – http://puppetlabs.com
✉ Daniel Pittman <[email protected]>
✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775
♲ Made with 100 percent post-consumer electrons

-- 
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