Commit f5a7c859 authored by Vincent Pelletier's avatar Vincent Pelletier

Factorise some lookups.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2162 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent ee447665
...@@ -766,17 +766,19 @@ class Application(object): ...@@ -766,17 +766,19 @@ class Application(object):
return return
tid = self.local_var.tid tid = self.local_var.tid
getCellListForOID = self._getCellListForOID
# select nodes where transaction was stored # select nodes where transaction was stored
cell_set = set(self._getCellListForTID(tid, cell_set = set(self._getCellListForTID(tid,
writable=True)) writable=True))
# select nodes where objects were stored # select nodes where objects were stored
for oid in self.local_var.data_dict.iterkeys(): for oid in self.local_var.data_dict.iterkeys():
cell_set |= set(self._getCellListForOID(oid, writable=True)) cell_set |= set(getCellListForOID(oid, writable=True))
p = Packets.AbortTransaction(tid) p = Packets.AbortTransaction(tid)
getConnForCell = self.cp.getConnForCell
# cancel transaction one all those nodes # cancel transaction one all those nodes
for cell in cell_set: for cell in cell_set:
conn = self.cp.getConnForCell(cell) conn = getConnForCell(cell)
if conn is None: if conn is None:
continue continue
conn.notify(p) conn.notify(p)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment