Skip to content

Commit

Permalink
Update resolvers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim authored May 15, 2023
1 parent 202a37a commit 64baccb
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions cylc/uiserver/resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 64baccb

Please sign in to comment.