Commit 616328a6 authored by Vincent Pelletier's avatar Vincent Pelletier

Simplify code.

parent 8dcb5e9b
...@@ -43,7 +43,7 @@ class AdministrationHandler(MasterHandler): ...@@ -43,7 +43,7 @@ class AdministrationHandler(MasterHandler):
def setClusterState(self, conn, state): def setClusterState(self, conn, state):
# check request # check request
if not state in CLUSTER_STATE_WORKFLOW.keys(): if state not in CLUSTER_STATE_WORKFLOW:
raise ProtocolError('Invalid state requested') raise ProtocolError('Invalid state requested')
valid_current_states = CLUSTER_STATE_WORKFLOW[state] valid_current_states = CLUSTER_STATE_WORKFLOW[state]
if self.app.cluster_state not in valid_current_states: if self.app.cluster_state not in valid_current_states:
......
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