On Sun, Jan 16, 2011 at 4:09 PM, James Turnbull <[email protected]>wrote:

>
> Signed-off-by: James Turnbull <[email protected]>
> ---
>  lib/puppet/util/settings.rb |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/lib/puppet/util/settings.rb b/lib/puppet/util/settings.rb
> index ca4ecda..8d3bb6e 100644
> --- a/lib/puppet/util/settings.rb
> +++ b/lib/puppet/util/settings.rb
> @@ -597,6 +597,7 @@ if @config.include?(:run_mode)
>       end
>     end
>
> +    str = str.gsub(/genconfig = true/, 'genconfig = false')
>     return str
>   end
>
>
It feels like we should be able to do something cleaner like:

str += obj.to_config + "\n" unless ReadOnly.include? obj.name or obj.name ==
:genconfig

instead of going down to gsub.

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