Use subprocess.run instead of subprocess.call

This commit is contained in:
Bugra Onal 2023-05-16 15:07:31 -07:00
parent b9123571f4
commit 217b0981a2
1 changed files with 2 additions and 2 deletions

View File

@ -412,12 +412,12 @@ class stimuli():
from openram import CONDA_HOME
cmd = "source {0}/bin/activate && {1} && conda deactivate".format(CONDA_HOME, cmd)
debug.info(2, cmd)
retcode = subprocess.call(cmd, stdout=spice_stdout, stderr=spice_stderr, shell=True)
proc = subprocess.run(cmd, stdout=spice_stdout, stderr=spice_stderr, shell=True)
spice_stdout.close()
spice_stderr.close()
if (retcode > valid_retcode):
if (proc.returncode > valid_retcode):
debug.error("Spice simulation error: " + cmd, -1)
else:
end_time = datetime.datetime.now()