diff --git a/swash/processing/swash.py b/swash/processing/swash.py index 1a739a8..1fb78df 100644 --- a/swash/processing/swash.py +++ b/swash/processing/swash.py @@ -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}")