Commit 847b9042 authored by Vincent Pelletier's avatar Vincent Pelletier

Use pop() instead of __getitem__() & __delitem__().

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2293 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 3bba916e
......@@ -151,12 +151,11 @@ class Replicator(object):
def setCriticalTID(self, uuid, tid):
"""This is a callback from MasterOperationHandler."""
try:
partition_list = self.critical_tid_dict[uuid]
partition_list = self.critical_tid_dict.pop(uuid)
logging.debug('setting critical TID %s to %s', dump(tid),
', '.join([str(p.getRID()) for p in partition_list]))
for partition in self.critical_tid_dict[uuid]:
for partition in partition_list:
partition.setCriticalTID(tid)
del self.critical_tid_dict[uuid]
except KeyError:
logging.debug("setCriticalTID raised KeyError for %s" %
(dump(uuid), ))
......
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