From: Tomas Doran Date: Fri, 5 Jun 2015 11:40:46 +0000 (+0100) Subject: Also catch :undefined_variable as thrown by future parser X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=212c498df32bf14879deac77b2ae7dca927a3c39;p=puppet-stdlib.git Also catch :undefined_variable as thrown by future parser --- 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