Commit 773cd549 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix Connection.notify prototype. It has no meaning to make it accept a msg_id...

Fix Connection.notify prototype. It has no meaning to make it accept a msg_id parameter (it was used as a dirty work around to Connection.answer which didn't accept a msg id as parameter).


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1046 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent c109d56c
......@@ -186,9 +186,7 @@ class MasterRequestEventHandler(MasterBaseEventHandler):
def __answerNeoCTL(self, msg_id, packet):
client_conn, kw = self.app.dispatcher.pop(msg_id)
# XXX: Notify method is not intended for this use. This must be
# fixed !
client_conn.notify(packet, kw['msg_id'])
client_conn.answer(packet, kw['msg_id'])
def handleAnswerClusterState(self, conn, packet, state):
logging.info("handleAnswerClusterState for a conn")
......
......@@ -382,10 +382,9 @@ class Connection(BaseConnection):
self.em.addIdleEvent(event)
@not_closed
def notify(self, packet, msg_id=None):
def notify(self, packet):
""" Then a packet with a new ID """
if msg_id is None:
msg_id = self._getNextId()
msg_id = self._getNextId()
packet.setId(msg_id)
self._addPacket(packet)
return msg_id
......
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