[data operation] add new remove_data method stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 15 Feb 2011 23:30:01 +0100
branchstable
changeset 6993 656561eddd1d
parent 6990 353ad06867a8
child 6996 86214f0da14f
[data operation] add new remove_data method
server/hook.py
--- a/server/hook.py	Mon Feb 14 17:46:08 2011 +0100
+++ b/server/hook.py	Tue Feb 15 23:30:01 2011 +0100
@@ -844,6 +844,12 @@
 postcommit method of the operation."""
         _container_add(self._container, data)
 
+    def remove_data(self, data):
+        assert not self._processed, """Trying to add data to a closed operation.
+Iterating over operation data closed it and should be reserved to precommit /
+postcommit method of the operation."""
+        self._container.remove(data)
+
     def get_data(self):
         assert not self._processed, """Trying to get data from a closed operation.
 Iterating over operation data closed it and should be reserved to precommit /