diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-02-08 05:11:49 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-02-08 05:11:49 +0000 |
commit | 1756bec99b9136463e5d35f1de4119b813ce40cc (patch) | |
tree | 380c1f37b2238fd37842a3b9934f6be16f36b450 /lib/puppet | |
parent | a216df2bcb304ad379e152f2f59ef7d942f54f3b (diff) | |
download | puppet-1756bec99b9136463e5d35f1de4119b813ce40cc.tar.gz puppet-1756bec99b9136463e5d35f1de4119b813ce40cc.tar.xz puppet-1756bec99b9136463e5d35f1de4119b813ce40cc.zip |
Fixing #484. Moving unit tests at the same time.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2181 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/util/config.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/puppet/util/config.rb b/lib/puppet/util/config.rb index 097d59b9f..b94b84051 100644 --- a/lib/puppet/util/config.rb +++ b/lib/puppet/util/config.rb @@ -39,7 +39,7 @@ class Puppet::Util::Config param = symbolize(param) unless @config.include?(param) raise Puppet::Error, - "Unknown configuration parameter %s" % param.inspect + "Attempt to assign a value to unknown configuration parameter %s" % param.inspect end unless @order.include?(param) @order << param @@ -283,6 +283,13 @@ class Puppet::Util::Config var = $1.intern value = mungearg($2) + # Only warn if we don't know what this config var is. This + # prevents exceptions later on. + unless @config.include?(var) or metas.include?(var.to_s) + Puppet.warning "Discarded unknown configuration parameter %s" % var.inspect + next # Skip this line. + end + # Mmm, "special" attributes if metas.include?(var.to_s) unless values.include?(section) |