From 70a311c54eb5d4f53ba626e874968bbcfd913deb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Wisniewski?= <gregory@nexedi.com> Date: Tue, 16 Feb 2010 10:04:45 +0000 Subject: [PATCH] Handle master's StopOperation packet in any state. git-svn-id: https://svn.erp5.org/repos/neo/trunk@1762 71dcc9de-d417-0410-9af5-da40c76e7ee4 --- neo/storage/handlers/__init__.py | 3 +++ neo/storage/handlers/master.py | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/neo/storage/handlers/__init__.py b/neo/storage/handlers/__init__.py index 17836cfa..86829cf8 100644 --- a/neo/storage/handlers/__init__.py +++ b/neo/storage/handlers/__init__.py @@ -28,6 +28,9 @@ class BaseMasterHandler(EventHandler): def connectionLost(self, conn, new_state): raise PrimaryFailure('connection lost') + def stopOperation(self, conn): + raise OperationFailure('operation stopped') + def reelectPrimary(self, conn): raise PrimaryFailure('re-election occurs') diff --git a/neo/storage/handlers/master.py b/neo/storage/handlers/master.py index 7968c2ea..19b20b5d 100644 --- a/neo/storage/handlers/master.py +++ b/neo/storage/handlers/master.py @@ -25,9 +25,6 @@ from neo.exception import OperationFailure class MasterOperationHandler(BaseMasterHandler): """ This handler is used for the primary master """ - def stopOperation(self, conn): - raise OperationFailure('operation stopped') - def answerLastIDs(self, conn, loid, ltid, lptid): self.app.replicator.setCriticalTID(conn.getUUID(), ltid) -- 2.30.9