diff options
author | Luke Kanies <luke@reductivelabs.com> | 2010-03-23 10:00:11 -0700 |
---|---|---|
committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
commit | 2777e1f052a51f0f52086cdfbea790902b0cecdc (patch) | |
tree | 5eb6f67fec42bcefff6022838631445b5753ca46 /lib/puppet | |
parent | 5aa26d08892010fc62de6adc278f07c8748d75e0 (diff) | |
download | puppet-2777e1f052a51f0f52086cdfbea790902b0cecdc.tar.gz puppet-2777e1f052a51f0f52086cdfbea790902b0cecdc.tar.xz puppet-2777e1f052a51f0f52086cdfbea790902b0cecdc.zip |
Fixing feature validation when passed one item
When I changed how the validation errors worked
I accidentally caused the feature list to need
to be an array rather than supporting either.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/property.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/puppet/property.rb b/lib/puppet/property.rb index b96f6d120..4b58abd1f 100644 --- a/lib/puppet/property.rb +++ b/lib/puppet/property.rb @@ -333,6 +333,7 @@ class Puppet::Property < Puppet::Parameter # Make sure that we've got all of the required features for a given value. def validate_features_per_value(value) if features = self.class.value_option(self.class.value_name(value), :required_features) + features = Array(features) needed_features = features.collect { |f| f.to_s }.join(", ") raise ArgumentError, "Provider must have features '#{needed_features}' to set '#{self.class.name}' to '#{value}'" unless provider.satisfies?(features) end |