Commit bc4b9f02 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Make sure that node is not None.

git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@153 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 269f31f7
......@@ -44,7 +44,7 @@ class ServiceEventHandler(MasterEventHandler):
if uuid is not None:
app = self.app
node = app.nm.getNodeByUUID(uuid)
if node.getState() == RUNNING_STATE:
if node is not None and node.getState() == RUNNING_STATE:
node.setState(TEMPORARILY_DOWN_STATE)
logging.debug('broadcasting node information')
app.broadcastNodeInformation(node)
......@@ -62,7 +62,7 @@ class ServiceEventHandler(MasterEventHandler):
if uuid is not None:
app = self.app
node = app.nm.getNodeByUUID(uuid)
if node.getState() == RUNNING_STATE:
if node is not None and node.getState() == RUNNING_STATE:
node.setState(TEMPORARILY_DOWN_STATE)
logging.debug('broadcasting node information')
app.broadcastNodeInformation(node)
......@@ -80,7 +80,7 @@ class ServiceEventHandler(MasterEventHandler):
if uuid is not None:
app = self.app
node = app.nm.getNodeByUUID(uuid)
if node.getState() != BROKEN_STATE:
if node is not None and node.getState() != BROKEN_STATE:
node.setState(BROKEN_STATE)
logging.debug('broadcasting node information')
app.broadcastNodeInformation(node)
......
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