Skip to content

Commit

Permalink
Subprocess run instead of call
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhankoral committed Oct 17, 2023
1 parent bb67a91 commit 4707bac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit 4707bac

Please sign in to comment.