1
Fork 0

Fixed Popen wait

This commit is contained in:
Edgar P. Burkhart 2022-03-03 12:28:29 +01:00
parent 7542571dfe
commit 9cadbaccf8
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -46,14 +46,14 @@ with tempfile.TemporaryDirectory(prefix="swash_", dir=".") as tmp_raw:
cmd = (config.get("swash", "swashrun"), "-input", inp.name, *mpi)
log.info(f"Running {cmd}")
subprocess.Popen(
swash_run = subprocess.Popen(
cmd,
cwd=tmpdir,
stdout=logfile,
stderr=logfile,
)
code = subprocess.wait()
code = swash_run.wait()
if code is not 0:
log.error(f"Swash returned error code {code}")