Commit 4085633a authored by Vincent Pelletier's avatar Vincent Pelletier

Remove try..except: pass blocks.

It is possible for rid not to be in partition_dict or new_partition_dict,
as this method is called from a master notification (partition changed),
which might happen outside of any replication (so when both dicts are
empty).

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2209 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 79df9de6
......@@ -235,16 +235,8 @@ class Replicator(object):
def removePartition(self, rid):
"""This is a callback from MasterOperationHandler."""
# 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:
pass
self.partition_dict.pop(rid, None)
self.new_partition_dict.pop(rid, None)
def addPartition(self, rid):
"""This is a callback from MasterOperationHandler."""
......
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