From 9aa5427f57cbce6d3799580d9aa435304a88f917 Mon Sep 17 00:00:00 2001 From: Ara Ghukasyan Date: Thu, 16 Feb 2023 10:10:09 -0500 Subject: [PATCH 1/2] check returncode instead of assuming error if stderr not empty --- covalent_ssh_plugin/ssh.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/covalent_ssh_plugin/ssh.py b/covalent_ssh_plugin/ssh.py index 505ae19..ebf7b15 100644 --- a/covalent_ssh_plugin/ssh.py +++ b/covalent_ssh_plugin/ssh.py @@ -500,7 +500,8 @@ async def run( if result_err := result.stderr.strip(): app_log.warning(result_err) - return self._on_ssh_fail(function, args, kwargs, result_err) + if result.returncode != 0: + return self._on_ssh_fail(function, args, kwargs, result_err) if not await self._poll_task(conn, remote_result_file): message = ( From c90e6c86a5eabe425564f864e7babdfbcb0a5664 Mon Sep 17 00:00:00 2001 From: Ara Ghukasyan Date: Thu, 16 Feb 2023 10:10:16 -0500 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55a24cb..4ed1dc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [UNRELEASED] +### Changed + +- Check `result.returncode != 0` inside `run` method before deferring to `_on_ssh_fail`. + ## [0.20.0] - 2022-12-15 ### Changed