summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-05-02 00:21:37 -0700
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commita228399fb921eabd635bddd92b63d86ee3c26d2c (patch)
treea2510200152e2f2008340ca9f6fd3ab83260eef2 /lib/puppet/parser
parentae520057280c2454bc44c64ac1e6686bf2eb086d (diff)
downloadpuppet-a228399fb921eabd635bddd92b63d86ee3c26d2c.tar.gz
puppet-a228399fb921eabd635bddd92b63d86ee3c26d2c.tar.xz
puppet-a228399fb921eabd635bddd92b63d86ee3c26d2c.zip
Fix to the fix for #3295
The output variable in the inner block wasn't visible in the outer block, and wasn't needed in any case, since the results are returned naturally if you just leave everything alone.
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/functions/generate.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/puppet/parser/functions/generate.rb b/lib/puppet/parser/functions/generate.rb
index 55161df1a..cf46775ab 100644
--- a/lib/puppet/parser/functions/generate.rb
+++ b/lib/puppet/parser/functions/generate.rb
@@ -26,12 +26,8 @@ Puppet::Parser::Functions::newfunction(:generate, :type => :rvalue,
end
begin
- Dir.chdir(File.dirname(args[0])) do
- output = Puppet::Util.execute(args)
- end
+ Dir.chdir(File.dirname(args[0])) { Puppet::Util.execute(args) }
rescue Puppet::ExecutionFailure => detail
- raise Puppet::ParseError, "Failed to execute generator %s: %s" %
- [args[0], detail]
+ raise Puppet::ParseError, "Failed to execute generator #{args[0]}: #{detail}"
end
- output
end