--- a/hooks/syncsources.py Tue Jul 12 10:36:22 2011 +0200
+++ b/hooks/syncsources.py Tue Jul 12 11:27:42 2011 +0200
@@ -53,7 +53,7 @@
class SourceRemovedOp(hook.Operation):
- def precommit_event(self):
+ def postcommit_event(self):
self.session.repo.remove_source(self.uri)
class SourceRemovedHook(SourceHook):
@@ -71,8 +71,9 @@
def precommit_event(self):
self.__processed = []
for source in self.get_data():
- conf = source.repo_source.check_config(source)
- self.__processed.append( (source, conf) )
+ if not self.session.deleted_in_transaction(source.eid):
+ conf = source.repo_source.check_config(source)
+ self.__processed.append( (source, conf) )
def postcommit_event(self):
for source, conf in self.__processed: