diff --git a/CHANGES.md b/CHANGES.md index d68d247512f..8860b8950d8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -51,6 +51,9 @@ never transient, and in practice job polling is the only way to recover). [#3409](https://github.com/cylc/cylc-flow/pull/3409) - prevent cylc-run from creating directories when executed for suites that do not exist. +[#3433](https://github.com/cylc/cylc-flow/pull/3433) - fix server abort at +shutdown during remote run dir tidy (introduced during Cylc 8 development). + ------------------------------------------------------------------------------- ## __cylc-8.0a1 (2019-09-18)__ diff --git a/cylc/flow/remote.py b/cylc/flow/remote.py index b877fa1ea53..e9703ebf4e7 100644 --- a/cylc/flow/remote.py +++ b/cylc/flow/remote.py @@ -70,7 +70,7 @@ def run_cmd(command, stdin=None, capture_process=False, capture_status=False, command inclusive of all opts and args required to run via ssh. stdin (file): If specified, it should be a readable file object. - If None, `open(DEVNULL)` is set if output is to be captured. + If None, DEVNULL is set if output is to be captured. capture_process (boolean): If True, set stdout=PIPE and return the Popen object. capture_status (boolean): diff --git a/cylc/flow/task_remote_mgr.py b/cylc/flow/task_remote_mgr.py index bb002c7de84..ad4f01ec182 100644 --- a/cylc/flow/task_remote_mgr.py +++ b/cylc/flow/task_remote_mgr.py @@ -241,7 +241,7 @@ def remote_tidy(self): cmd.append(get_remote_suite_run_dir(host, owner, self.suite)) procs[(host, owner)] = ( cmd, - Popen(cmd, stdout=PIPE, stderr=PIPE, stdin=open(DEVNULL))) + Popen(cmd, stdout=PIPE, stderr=PIPE, stdin=DEVNULL)) # Wait for commands to complete for a max of 10 seconds timeout = time() + 10.0 while procs and time() < timeout: