Commit 01735352 authored by Vincent Pelletier's avatar Vincent Pelletier

Catch KeyError from pop() only.

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