summaryrefslogtreecommitdiffstats
path: root/lib/puppet/resource
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppetlabs.com>2011-06-10 14:03:47 -0700
committerJosh Cooper <josh@puppetlabs.com>2011-06-10 14:03:47 -0700
commit6996e0bbfb3559773e5fa0d133a7632dcb06b2d5 (patch)
tree980f769d795cdbd8b3972e7ff2b6e503daffe4f9 /lib/puppet/resource
parentcaca469976cc8b5ff6c7f68d7324eecd35399176 (diff)
Do not needlessly create multiple reports when creating a transaction
Previously, the transaction would always create a report, which would some times be overridden with a new report. Now, the transaction optionally takes a report at initialization time, and only creates a report of its own if none was provided. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
Diffstat (limited to 'lib/puppet/resource')
-rw-r--r--lib/puppet/resource/catalog.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/puppet/resource/catalog.rb b/lib/puppet/resource/catalog.rb
index a8668d844..8d4918bbf 100644
--- a/lib/puppet/resource/catalog.rb
+++ b/lib/puppet/resource/catalog.rb
@@ -132,9 +132,8 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph
expire
Puppet::Util::Storage.load if host_config?
- transaction = Puppet::Transaction.new(self)
+ transaction = Puppet::Transaction.new(self, options[:report])
- transaction.report = options[:report] if options[:report]
transaction.tags = options[:tags] if options[:tags]
transaction.ignoreschedules = true if options[:ignoreschedules]