diff options
author | Tomas Doran <tdoran@yelp.com> | 2014-07-18 14:36:09 -0700 |
---|---|---|
committer | Tomas Doran <tdoran@yelp.com> | 2014-09-22 14:43:27 -0700 |
commit | 032f93af1d9704dc218ef411e9e81befbe1c70a3 (patch) | |
tree | 5e2703fbf5d7a89f9702e1f7b03bb805aeefc840 /lib/puppet/parser/functions/getvar.rb | |
parent | b347cc83e24e7ef51dc340bc753b96af026050f8 (diff) |
Fix strict_variables = true
Diffstat (limited to 'lib/puppet/parser/functions/getvar.rb')
-rw-r--r-- | lib/puppet/parser/functions/getvar.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/getvar.rb b/lib/puppet/parser/functions/getvar.rb index 1621149..fb336b6 100644 --- a/lib/puppet/parser/functions/getvar.rb +++ b/lib/puppet/parser/functions/getvar.rb @@ -19,7 +19,10 @@ module Puppet::Parser::Functions raise Puppet::ParseError, ("getvar(): wrong number of arguments (#{args.length}; must be 1)") end - self.lookupvar("#{args[0]}") + begin + self.lookupvar("#{args[0]}") + rescue Puppet::ParseError # Eat the exception if strict_variables = true is set + end end |