diff options
Diffstat (limited to 'lib/puppet/parser/functions/template.rb')
-rw-r--r-- | lib/puppet/parser/functions/template.rb | 5 |
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" % |