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