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)
|
cmd = (config.get("swash", "swashrun"), "-input", inp.name, *mpi)
|
||||||
log.info(f"Running {cmd}")
|
log.info(f"Running {cmd}")
|
||||||
|
|
||||||
subprocess.Popen(
|
swash_run = subprocess.Popen(
|
||||||
cmd,
|
cmd,
|
||||||
cwd=tmpdir,
|
cwd=tmpdir,
|
||||||
stdout=logfile,
|
stdout=logfile,
|
||||||
stderr=logfile,
|
stderr=logfile,
|
||||||
)
|
)
|
||||||
|
|
||||||
code = subprocess.wait()
|
code = swash_run.wait()
|
||||||
if code is not 0:
|
if code is not 0:
|
||||||
log.error(f"Swash returned error code {code}")
|
log.error(f"Swash returned error code {code}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue