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

Minors fixes.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@795 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent a81824a0
......@@ -148,6 +148,9 @@ class ListeningConnection(BaseConnection):
except ConnectorTryAgainException:
pass
def writable(self):
return False
def isListeningConnection(self):
return True
......
......@@ -104,7 +104,7 @@ class EventHandler(object):
conn.abort()
self.peerBroken(conn)
def unexpectedPacket(self, conn, packet, message=None, *args):
def unexpectedPacket(self, conn, packet, message=None):
"""Handle an unexpected packet."""
if message is None:
message = 'unexpected packet type %s in %s' % (packet.getType(),
......@@ -248,10 +248,10 @@ class EventHandler(object):
def handleAnswerNewTID(self, conn, packet, tid):
raise UnexpectedPacketError
def handleAskNewOIDs(self, conn, packet):
def handleAskNewOIDs(self, conn, packet, num_oids):
raise UnexpectedPacketError
def handleAnswerNewOIDs(self, conn, packet, oid_list):
def handleAnswerNewOIDs(self, conn, packet, num_oids):
raise UnexpectedPacketError
def handleFinishTransaction(self, conn, packet, oid_list, tid):
......
......@@ -56,7 +56,7 @@ class AdministrationEventHandler(MasterEventHandler):
self.checkClusterName(name)
if state == protocol.RUNNING:
self.app.cluster_state = state
if state == STOPPING:
if state == protocol.STOPPING:
self.app.cluster_state = state
p = protocol.noError('cluster state changed')
conn.answer(p, packet)
......
......@@ -28,16 +28,6 @@ class MasterEventHandler(EventHandler):
self.app = app
EventHandler.__init__(self)
def handleRequestNodeIdentification(self, conn, packet, node_type,
uuid, ip_address, port, name):
raise NotImplementedError('this method must be overridden')
def handleAnnouncePrimaryMaster(self, conn, packet):
raise NotImplementedError('this method must be overridden')
def handleReelectPrimaryMaster(self, conn, packet):
raise NotImplementedError('this method must be overridden')
def handleNotifyNodeInformation(self, conn, packet, node_list):
logging.error('ignoring Notify Node Information in %s', self.__class__.__name__)
......@@ -65,7 +55,7 @@ class MasterEventHandler(EventHandler):
def handleAskNewTID(self, conn, packet):
logging.error('ignoring Ask New TID in %s' % self.__class__.__name__)
def handleAskNewOIDs(self, conn, packet):
def handleAskNewOIDs(self, conn, packet, num_oids):
logging.error('ignoring Ask New OIDs in %s' % self.__class__.__name__)
def handleFinishTransaction(self, conn, packet, oid_list, tid):
......
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