From 3489bd85669dd06ad0ec06430556aaeb4ba14e5d Mon Sep 17 00:00:00 2001 From: luke Date: Thu, 8 Mar 2007 17:07:35 +0000 Subject: One last try at getting the config and mode stuff working. The tests were passing because "mode" is a valid config option in the tests, but not in the real configuration. So, now the Config class correctly only tries to set the meta params if they are valid options, otherwise they get skipped. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2272 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/util/config.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib/puppet/util') diff --git a/lib/puppet/util/config.rb b/lib/puppet/util/config.rb index afec4c943..7731fdc5b 100644 --- a/lib/puppet/util/config.rb +++ b/lib/puppet/util/config.rb @@ -301,13 +301,11 @@ class Puppet::Util::Config end values[section][var.to_s] = value - # Do some annoying skullduggery here. This is so that - # the group can be set in the config file. The problem - # is that we're using the word 'group' twice, which is - # confusing. - if var == :group and section == Puppet[:name] and @config.include?(:group) - @config[:group].value = value + # If the parameter is valid, then set it. + if section == Puppet[:name] and @config.include?(var) + @config[var].value = value end + next end # Don't override set parameters, since the file is parsed -- cgit