Commit 9b0baf8a authored by Grégory Wisniewski's avatar Grégory Wisniewski

Move this check to the transaction manager.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2171 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent dc6b7cee
......@@ -48,10 +48,7 @@ class ClientServiceHandler(MasterHandler):
conn.answer(Packets.AnswerNodeInformation())
def abortTransaction(self, conn, tid):
if tid in self.app.tm:
self.app.tm.remove(tid)
else:
logging.warn('aborting transaction %s does not exist', dump(tid))
def askBeginTransaction(self, conn, tid):
node = self.app.nm.getByUUID(conn.getUUID())
......
......@@ -233,6 +233,7 @@ class TransactionManager(object):
Remove a transaction, commited or aborted
"""
if tid not in self._tid_dict:
logging.warn('aborting transaction %s does not exist', dump(tid))
return
node = self._tid_dict[tid].getNode()
# remove both mappings, node will be removed in abortFor
......
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