Commit 5c20c924 authored by Aurel's avatar Aurel

-when sending an error message use answer method so that admin node

retrieve the original connection
- simplify if...else condition


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@720 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 8b046c68
...@@ -65,7 +65,7 @@ class AdministrationEventHandler(MasterEventHandler): ...@@ -65,7 +65,7 @@ class AdministrationEventHandler(MasterEventHandler):
node = app.nm.getNodeByUUID(uuid) node = app.nm.getNodeByUUID(uuid)
if node is None: if node is None:
p = protocol.protocolError('invalid uuid') p = protocol.protocolError('invalid uuid')
conn.notify(p) conn.answer(p, packet)
return return
if uuid == app.uuid: if uuid == app.uuid:
...@@ -86,9 +86,7 @@ class AdministrationEventHandler(MasterEventHandler): ...@@ -86,9 +86,7 @@ class AdministrationEventHandler(MasterEventHandler):
# no change, just notify admin node # no change, just notify admin node
p = protocol.noError('node state changed') p = protocol.noError('node state changed')
conn.answer(p, packet) conn.answer(p, packet)
else:
# Change node state
if node.getState() != state:
# first make sure to have a connection to the node # first make sure to have a connection to the node
node_conn = None node_conn = None
conn_found = False conn_found = False
......
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