From 217b0981a24ab9411276083722eadbf5b77121c7 Mon Sep 17 00:00:00 2001 From: Bugra Onal Date: Tue, 16 May 2023 15:07:31 -0700 Subject: [PATCH] Use subprocess.run instead of subprocess.call --- compiler/characterizer/stimuli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/characterizer/stimuli.py b/compiler/characterizer/stimuli.py index c2bf3e39..45997b7e 100644 --- a/compiler/characterizer/stimuli.py +++ b/compiler/characterizer/stimuli.py @@ -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()