diff options
author | Tomas Doran <tdoran@yelp.com> | 2015-06-05 12:40:46 +0100 |
---|---|---|
committer | Tomas Doran <tdoran@yelp.com> | 2015-06-05 12:43:01 +0100 |
commit | 212c498df32bf14879deac77b2ae7dca927a3c39 (patch) | |
tree | 065bd7295d7e00050b8202cc52dbf796e7cbcf88 /lib/puppet/parser/functions | |
parent | c69b75f88bba933857c161945721b3802445d9be (diff) |
Also catch :undefined_variable as thrown by future parser
Diffstat (limited to 'lib/puppet/parser/functions')
-rw-r--r-- | lib/puppet/parser/functions/getvar.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/getvar.rb b/lib/puppet/parser/functions/getvar.rb index fb336b6..ae9c869 100644 --- a/lib/puppet/parser/functions/getvar.rb +++ b/lib/puppet/parser/functions/getvar.rb @@ -20,7 +20,9 @@ module Puppet::Parser::Functions end begin - self.lookupvar("#{args[0]}") + catch(:undefined_variable) do + self.lookupvar("#{args[0]}") + end rescue Puppet::ParseError # Eat the exception if strict_variables = true is set end |