Commit d3869809 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Remove unexplained try/except/pass statements.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1628 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 43b1e494
...@@ -58,34 +58,26 @@ class MasterOperationHandler(BaseMasterHandler): ...@@ -58,34 +58,26 @@ class MasterOperationHandler(BaseMasterHandler):
def lockInformation(self, conn, tid): def lockInformation(self, conn, tid):
app = self.app app = self.app
# TODO: remove try..except: pass t = app.transaction_dict[tid]
try: object_list = t.getObjectList()
t = app.transaction_dict[tid] for o in object_list:
object_list = t.getObjectList() app.load_lock_dict[o[0]] = tid
for o in object_list:
app.load_lock_dict[o[0]] = tid app.dm.storeTransaction(tid, object_list, t.getTransaction())
app.dm.storeTransaction(tid, object_list, t.getTransaction())
except KeyError:
pass
conn.answer(Packets.AnswerInformationLocked(tid)) conn.answer(Packets.AnswerInformationLocked(tid))
def notifyUnlockInformation(self, conn, tid): def notifyUnlockInformation(self, conn, tid):
app = self.app app = self.app
# TODO: remove try..except: pass t = app.transaction_dict[tid]
try: object_list = t.getObjectList()
t = app.transaction_dict[tid] for o in object_list:
object_list = t.getObjectList() oid = o[0]
for o in object_list: del app.load_lock_dict[oid]
oid = o[0] del app.store_lock_dict[oid]
del app.load_lock_dict[oid]
del app.store_lock_dict[oid] app.dm.finishTransaction(tid)
del app.transaction_dict[tid]
app.dm.finishTransaction(tid)
del app.transaction_dict[tid] # Now it may be possible to execute some events.
app.executeQueuedEvents()
# Now it may be possible to execute some events.
app.executeQueuedEvents()
except KeyError:
pass
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