From 4707bac7733ba6ef8dcb91f31a0583d0a157a96d Mon Sep 17 00:00:00 2001 From: oguzhankoral Date: Tue, 17 Oct 2023 17:58:06 +0300 Subject: [PATCH] Subprocess run instead of call --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 5e66812..6f5fc8c 100644 --- a/main.py +++ b/main.py @@ -105,7 +105,8 @@ def automate_function( cmd = "/bin/bash -c '{cmd_path}'".format(cmd_path=cmd_path) pipefile = open('output', 'w') - retcode = subprocess.call(cmd, shell=True, stdout=pipefile) + # retcode = subprocess.call(cmd, shell=True, stdout=pipefile) + subprocess.run(cmd, shell=True) pipefile.close() os.remove('output')