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):
def _finishReplication(self):
# TODO: remove try..except: pass
try:
self.partition_dict.pop(self.current_partition.getOffset())
# Notify to a primary master node that my cell is now up-to-date.
conn = self.app.master_conn
offset = self.current_partition.getOffset()
self.partition_dict.pop(offset)
conn.notify(Packets.NotifyReplicationDone(offset))
except KeyError:
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