From 64baccbecc478d7cbaa06c35b81cb13962cb6292 Mon Sep 17 00:00:00 2001 From: Tim Pillinger <26465611+wxtim@users.noreply.github.com> Date: Mon, 15 May 2023 08:57:33 +0100 Subject: [PATCH] Update resolvers.py --- cylc/uiserver/resolvers.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/cylc/uiserver/resolvers.py b/cylc/uiserver/resolvers.py index f9a8574c..04e52f03 100644 --- a/cylc/uiserver/resolvers.py +++ b/cylc/uiserver/resolvers.py @@ -317,19 +317,14 @@ async def play(cls, workflows, args, workflows_mgr, log): if ret: # command failed out, err = proc.communicate() - if 'previously run with' in out: - # Can't upgrade: - msg = out - else: - msg = ( - f'Could not start {tokens["workflow"]}' - f' - {cmd_repr}' - ) - + msg = out.strip() or err.strip() or ( + f'Could not start {tokens["workflow"]}' + f' - {cmd_repr}' + ) raise Exception( msg - # suppress traceback unless in debug mode - + (f' - {err}' if DEBUG else '') + # include possible traceback in debug mode + + (f' - {err}' if DEBUG and not out.strip() else '') ) except Exception as exc: