Commit 366e228a authored by Grégory Wisniewski's avatar Grégory Wisniewski

The protocolError packet is an answer, not a notification, fix this and use an

exception to let the base handler send the packet.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1237 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 2208c05b
...@@ -64,9 +64,7 @@ class AdminEventHandler(EventHandler): ...@@ -64,9 +64,7 @@ class AdminEventHandler(EventHandler):
logging.info("set node state for %s-%s" %(dump(uuid), state)) logging.info("set node state for %s-%s" %(dump(uuid), state))
node = self.app.nm.getNodeByUUID(uuid) node = self.app.nm.getNodeByUUID(uuid)
if node is None: if node is None:
p = protocol.protocolError('invalid uuid') raise protocol.ProtocolError('invalid uuid')
conn.notify(p)
return
if node.getState() == state and modify_partition_table is False: if node.getState() == state and modify_partition_table is False:
# no change # no change
p = protocol.noError('no change') p = protocol.noError('no change')
......
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