summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-09-07 02:52:16 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-09-07 02:52:16 +0000
commit4f2812a2180894b645583c7a7c3aa8a012b2b0ac (patch)
treef31a011180821d5ec10ed11818e9127a1bfe5853 /lib
parent72638e6d17231fb6b24078c89f63b80b78065683 (diff)
downloadpuppet-4f2812a2180894b645583c7a7c3aa8a012b2b0ac.tar.gz
puppet-4f2812a2180894b645583c7a7c3aa8a012b2b0ac.tar.xz
puppet-4f2812a2180894b645583c7a7c3aa8a012b2b0ac.zip
changing rollback() to do event handling also
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@629 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/transaction.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/transaction.rb b/lib/puppet/transaction.rb
index 9e5a0fe30..2e726df0b 100644
--- a/lib/puppet/transaction.rb
+++ b/lib/puppet/transaction.rb
@@ -113,7 +113,7 @@ class Transaction
#---------------------------------------------------------------
def rollback
- @changes.each { |change|
+ events = @changes.collect { |change|
if change.is_a?(Puppet::StateChange)
next unless change.run
#change.transaction = self
@@ -135,6 +135,11 @@ class Transaction
else
raise "Transactions cannot handle objects of type %s" % child.class
end
+ }.flatten.reject { |e| e.nil? }
+
+ events.each { |event|
+ object = event.source
+ object.propagate(event)
}
end
#---------------------------------------------------------------