projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update stdlib
[mirror/dsa-puppet.git]
/
3rdparty
/
modules
/
stdlib
/
lib
/
puppet
/
parser
/
functions
/
getvar.rb
diff --git
a/3rdparty/modules/stdlib/lib/puppet/parser/functions/getvar.rb
b/3rdparty/modules/stdlib/lib/puppet/parser/functions/getvar.rb
index
fb336b6
..
3af8d48
100644
(file)
--- a/
3rdparty/modules/stdlib/lib/puppet/parser/functions/getvar.rb
+++ b/
3rdparty/modules/stdlib/lib/puppet/parser/functions/getvar.rb
@@
-20,7
+20,13
@@
module Puppet::Parser::Functions
end
begin
end
begin
- self.lookupvar("#{args[0]}")
+ result = nil
+ catch(:undefined_variable) do
+ result = self.lookupvar("#{args[0]}")
+ end
+
+ # avoid relying on incosistent behaviour around ruby return values from catch
+ result
rescue Puppet::ParseError # Eat the exception if strict_variables = true is set
end
rescue Puppet::ParseError # Eat the exception if strict_variables = true is set
end