Commit 1b412591 authored by Vincent Pelletier's avatar Vincent Pelletier

Add TODOs near possibly abusive "try:..except..: pass" blocks.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1609 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent af907e65
......@@ -61,6 +61,7 @@ class ClientOperationHandler(BaseClientAndStorageOperationHandler):
if t.getUUID() == uuid:
for o in t.getObjectList():
oid = o[0]
# TODO: remove try..except: pass
try:
del app.store_lock_dict[oid]
del app.load_lock_dict[oid]
......@@ -87,11 +88,13 @@ class ClientOperationHandler(BaseClientAndStorageOperationHandler):
def abortTransaction(self, conn, tid):
app = self.app
# TODO: remove try..except: pass
try:
t = app.transaction_dict[tid]
object_list = t.getObjectList()
for o in object_list:
oid = o[0]
# TODO: remove try..except: pass
try:
del app.load_lock_dict[oid]
except KeyError:
......
......@@ -58,6 +58,7 @@ class MasterOperationHandler(BaseMasterHandler):
def lockInformation(self, conn, tid):
app = self.app
# TODO: remove try..except: pass
try:
t = app.transaction_dict[tid]
object_list = t.getObjectList()
......@@ -71,6 +72,7 @@ class MasterOperationHandler(BaseMasterHandler):
def notifyUnlockInformation(self, conn, tid):
app = self.app
# TODO: remove try..except: pass
try:
t = app.transaction_dict[tid]
object_list = t.getObjectList()
......
......@@ -41,6 +41,7 @@ class VerificationHandler(BaseMasterHandler):
try:
for offset in offset_list:
row = []
# TODO: remove try..except: pass
try:
for cell in app.pt.getCellList(offset):
row.append((cell.getUUID(), cell.getState()))
......
......@@ -190,6 +190,7 @@ class Replicator(object):
def _finishReplication(self):
app = self.app
# TODO: remove try..except: pass
try:
self.partition_dict.pop(self.current_partition.getRID())
# Notify to a primary master node that my cell is now up-to-date.
......@@ -238,11 +239,12 @@ class Replicator(object):
def removePartition(self, rid):
"""This is a callback from OperationEventHandler."""
# TODO: remove try..except: pass
try:
self.partition_dict.pop(rid)
except KeyError:
pass
# TODO: remove try..except: pass
try:
self.new_partition_dict.pop(rid)
except KeyError:
......
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