From 2984614c1df82b46e71c5e38223737fb6de23d0b Mon Sep 17 00:00:00 2001 From: Alan Malta Rodrigues Date: Thu, 30 Sep 2021 15:37:01 +0200 Subject: [PATCH] Fix python version in subprocess call for inject-test-wfs --- test/data/ReqMgr/inject-test-wfs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/data/ReqMgr/inject-test-wfs.py b/test/data/ReqMgr/inject-test-wfs.py index cfe47db5fe..d8c1451f90 100644 --- a/test/data/ReqMgr/inject-test-wfs.py +++ b/test/data/ReqMgr/inject-test-wfs.py @@ -216,9 +216,12 @@ def main(): tmpFile = '/tmp/%s.json' % pwd.getpwuid(os.getuid()).pw_name wfCounter = 0 + # figure out which python version it is + pythonCmd = "python3" if sys.version_info[0] == 3 else "python" + for fname in templates: logger.info("Processing template: %s", fname) - strComand = "python %s -u %s -f %s -i " % (reqMgrCommand, args.url, tmpFile) + strComand = "%s %s -u %s -f %s -i " % (pythonCmd, reqMgrCommand, args.url, tmpFile) # read the original json template with open(wmcorePath + fname) as fo: