]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
Also catch :undefined_variable as thrown by future parser
authorTomas Doran <tdoran@yelp.com>
Fri, 5 Jun 2015 11:40:46 +0000 (12:40 +0100)
committerTomas Doran <tdoran@yelp.com>
Fri, 5 Jun 2015 11:43:01 +0000 (12:43 +0100)
lib/puppet/parser/functions/getvar.rb

index fb336b6aca070932b015d96fbb97abdea61a6607..ae9c869d1ca6962128fa2e4b25be1983f242a569 100644 (file)
@@ -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