diff options
author | Luke Kanies <luke@reductivelabs.com> | 2009-12-21 16:23:44 -0800 |
---|---|---|
committer | Luke Kanies <luke@reductivelabs.com> | 2009-12-21 16:23:44 -0800 |
commit | 740fd6b301af89ab3aad89bca183ad1fcdc24ac4 (patch) | |
tree | f34617a229509c373d28d67abb453e7ae2136c39 /lib/puppet/util/methodhelper.rb | |
parent | 8971d8beae2c409f9052f27c3f80ad3bdfff4de2 (diff) | |
parent | 4a06379f8770c164e42bcc410d874076c6e95f24 (diff) | |
download | puppet-740fd6b301af89ab3aad89bca183ad1fcdc24ac4.tar.gz puppet-740fd6b301af89ab3aad89bca183ad1fcdc24ac4.tar.xz puppet-740fd6b301af89ab3aad89bca183ad1fcdc24ac4.zip |
Merge branch '0.25.x'
Conflicts:
lib/puppet/agent.rb
lib/puppet/application/puppetd.rb
lib/puppet/parser/ast/leaf.rb
lib/puppet/util/rdoc/parser.rb
Diffstat (limited to 'lib/puppet/util/methodhelper.rb')
-rw-r--r-- | lib/puppet/util/methodhelper.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/puppet/util/methodhelper.rb b/lib/puppet/util/methodhelper.rb index 32fca1877..ecc9d537f 100644 --- a/lib/puppet/util/methodhelper.rb +++ b/lib/puppet/util/methodhelper.rb @@ -12,11 +12,10 @@ module Puppet::Util::MethodHelper def set_options(options) options.each do |param,value| method = param.to_s + "=" - begin + if respond_to? method self.send(method, value) - rescue NoMethodError - raise ArgumentError, "Invalid parameter %s to object class %s" % - [param,self.class.to_s] + else + raise ArgumentError, "Invalid parameter #{param} to object class #{self.class}" end end end |