Skip to content

Commit

Permalink
conditionally output error
Browse files Browse the repository at this point in the history
  • Loading branch information
alexboden committed Dec 3, 2024
1 parent c6891b6 commit 6cc2e19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ def check_slurm_status():

if sacct_result.returncode != 0:
logger.error(f"sacct command failed with return code {sacct_result.returncode}")
logger.error(f"Error output: {sacct_result.stderr}")
if sacct_result.stderr:
logger.error(f"Error output: {sacct_result.stderr}")
continue

for line in sacct_output.split('\n'):
Expand Down

0 comments on commit 6cc2e19

Please sign in to comment.