Commit a8e67b20 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Factorise access to offset.

Signed-off-by: default avatarGrégory <gregory@nexedi.com>

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2647 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent e4fce5a3
...@@ -274,10 +274,10 @@ class Replicator(object): ...@@ -274,10 +274,10 @@ class Replicator(object):
def _finishReplication(self): def _finishReplication(self):
# TODO: remove try..except: pass # TODO: remove try..except: pass
try: try:
self.partition_dict.pop(self.current_partition.getOffset())
# 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.
conn = self.app.master_conn conn = self.app.master_conn
offset = self.current_partition.getOffset() offset = self.current_partition.getOffset()
self.partition_dict.pop(offset)
conn.notify(Packets.NotifyReplicationDone(offset)) conn.notify(Packets.NotifyReplicationDone(offset))
except KeyError: except KeyError:
pass pass
......
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