Fixed Popen wait
This commit is contained in:
parent
7542571dfe
commit
9cadbaccf8
1 changed files with 2 additions and 2 deletions
|
@ -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}")
|
||||
|
||||
|
|
Loading…
Reference in a new issue