summaryrefslogtreecommitdiffstats
path: root/ms/command-executor
diff options
context:
space:
mode:
authorkuldipr <kuldip.rai@amdocs.com>2022-04-14 17:52:59 -0400
committerkuldipr <kuldip.rai@amdocs.com>2022-04-14 17:58:32 -0400
commitc1628bf38231da93287009f736ac7e2c0ea8ffa7 (patch)
tree41006493aa1c41bf527ebfcaea8ed778f2b734d0 /ms/command-executor
parent7d17ee81e257b6e74f4c75279e9488d154904313 (diff)
Update cmd-exec for Python 3.7
Issue-ID: CCSDK-3632 Signed-off-by: kuldipr <kuldip.rai@amdocs.com> Change-Id: I351203e1935ccee9327edf39b9809b873e391f86
Diffstat (limited to 'ms/command-executor')
-rw-r--r--ms/command-executor/src/main/python/command_executor_handler.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ms/command-executor/src/main/python/command_executor_handler.py b/ms/command-executor/src/main/python/command_executor_handler.py
index d90feab31..47f45b5a2 100644
--- a/ms/command-executor/src/main/python/command_executor_handler.py
+++ b/ms/command-executor/src/main/python/command_executor_handler.py
@@ -29,6 +29,7 @@ from zipfile import ZipFile
import io
import time
import prometheus_client as prometheus
+import shlex
REQUIREMENTS_TXT = "requirements.txt"
@@ -245,7 +246,7 @@ class CommandExecutorHandler():
### if properties are defined we add them to the command
properties = ""
if request.properties is not None and len(request.properties) > 0:
- properties = " " + re.escape(MessageToJson(request.properties)).replace('"','\\"')
+ properties = " " + shlex.quote(MessageToJson(request.properties))
# SR7/SR10 compatibility hack
# check if the path for the request.command does not contain UUID, then add it after cba_name/cba_version path.