From 12b409e2f8f189f86ca44ac1acf0f60631f7dfa2 Mon Sep 17 00:00:00 2001 From: M Bernt Date: Thu, 16 May 2019 07:36:02 +0200 Subject: [PATCH] output_checker: fix superficial condition --- lib/galaxy/jobs/output_checker.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/galaxy/jobs/output_checker.py b/lib/galaxy/jobs/output_checker.py index 0d4bae30de6..d644389b13a 100644 --- a/lib/galaxy/jobs/output_checker.py +++ b/lib/galaxy/jobs/output_checker.py @@ -146,11 +146,8 @@ def check_output(stdio_regexes, stdio_exit_codes, stdout, stderr, tool_exit_code if stderr: state = DETECTED_JOB_STATE.GENERIC_ERROR - if state != DETECTED_JOB_STATE.OK and stderr: - if stderr: - peak = stderr[0:ERROR_PEAK] - else: - peak = "" + if state != DETECTED_JOB_STATE.OK: + peak = stderr[0:ERROR_PEAK] if stderr else "" log.debug("job failed, detected state %s, standard error is - [%s]" % (state, peak)) except Exception: log.exception("Job state check encountered unexpected exception; assuming execution successful")