summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/functions
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2008-11-23 00:01:04 +0100
committerBrice Figureau <brice-puppet@daysofwonder.com>2008-11-29 12:00:21 +0100
commitcc45c435b7f62f83f0d0cd4b952a5c05ccfaaac9 (patch)
treeec2cf2e1c5f7327230f3c0372119e6c7b71b0298 /lib/puppet/parser/functions
parentd8c741f9d3b07b11f11af0765d740d9e78889794 (diff)
downloadpuppet-cc45c435b7f62f83f0d0cd4b952a5c05ccfaaac9.tar.gz
puppet-cc45c435b7f62f83f0d0cd4b952a5c05ccfaaac9.tar.xz
puppet-cc45c435b7f62f83f0d0cd4b952a5c05ccfaaac9.zip
Fix #1741 - refactor TemplateWrapper, test for template function
Diffstat (limited to 'lib/puppet/parser/functions')
-rw-r--r--lib/puppet/parser/functions/template.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/puppet/parser/functions/template.rb b/lib/puppet/parser/functions/template.rb
index e62c3b326..2eaace1d7 100644
--- a/lib/puppet/parser/functions/template.rb
+++ b/lib/puppet/parser/functions/template.rb
@@ -9,10 +9,11 @@ Puppet::Parser::Functions::newfunction(:template, :type => :rvalue, :doc =>
# Use a wrapper, so the template can't get access to the full
# Scope object.
debug "Retrieving template %s" % file
- wrapper = Puppet::Parser::TemplateWrapper.new(self, file)
+ wrapper = Puppet::Parser::TemplateWrapper.new(self)
+ wrapper.file = file
begin
- wrapper.result()
+ wrapper.result
rescue => detail
raise Puppet::ParseError,
"Failed to parse template %s: %s" %