aboutsummaryrefslogtreecommitdiffstats
path: root/ms/command-executor/src
diff options
context:
space:
mode:
authorSerge Simard <serge@agilitae.com>2019-11-19 10:24:56 -0500
committerSerge Simard <serge@agilitae.com>2019-11-19 10:35:07 -0500
commit328e55fd0b989513b62566ecc69a03b98733f4fc (patch)
tree2a485592d510eaa216d01d72ac593acc6d3babb8 /ms/command-executor/src
parent1337eccc2be949d860f3c5b1f0148c061c3c669b (diff)
Changes return value from boolean to typical process return code;
Also ensure that if environment preparation does not succeed the processing fails. Issue-ID: CCSDK-1855 Signed-off-by: Serge Simard <serge@agilitae.com> Change-Id: Iab2ec8b44a0e9e7edef68d0d5c13860eedc5be67 Signed-off-by: Serge Simard <serge@agilitae.com>
Diffstat (limited to 'ms/command-executor/src')
-rw-r--r--ms/command-executor/src/main/python/command_executor_server.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ms/command-executor/src/main/python/command_executor_server.py b/ms/command-executor/src/main/python/command_executor_server.py
index 577c8a0ca..39cd1e6da 100644
--- a/ms/command-executor/src/main/python/command_executor_server.py
+++ b/ms/command-executor/src/main/python/command_executor_server.py
@@ -53,12 +53,12 @@ class CommandExecutorServer(CommandExecutor_pb2_grpc.CommandExecutorServiceServi
payload_result = {}
handler = CommandExecutorHandler(request)
payload_result = handler.execute_command(request, log_results)
- if not payload_result["cds_return_code"]:
+ if payload_result["cds_return_code"] != 0:
self.logger.info("{} - Failed to executeCommand. {}".format(blueprint_id, log_results))
else:
self.logger.info("{} - Execution finished successfully.".format(blueprint_id))
- ret = utils.build_response(request, log_results, payload_result, payload_result["cds_return_code"])
+ ret = utils.build_response(request, log_results, payload_result, payload_result["cds_return_code"] == 0)
self.logger.info("Payload returned %s" % payload_result)
return ret \ No newline at end of file