From 8f16a8fce88a387e4ffeafd80a64396f07fab7c4 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver <thomas@kluyver.me.uk> Date: Tue, 5 Oct 2021 11:14:32 +0100 Subject: [PATCH] Don't call sacct in finalize if there are no Slurm jobs involved --- src/xfel_calibrate/finalize.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xfel_calibrate/finalize.py b/src/xfel_calibrate/finalize.py index 6a3b7c3af..ed6f36fe0 100644 --- a/src/xfel_calibrate/finalize.py +++ b/src/xfel_calibrate/finalize.py @@ -141,6 +141,8 @@ def get_job_info(jobs: List[str], fmt: List[str]) -> List[List[str]]: Result ordered according to order of jobs given Order of fields in inner lists follows fmt """ + if not jobs: + return [] # Skip calling sacct if not using Slurm # will use JobID to match results to jobs (duplicate field in fmt is OK) fmt_query = ",".join(["JobID"] + fmt) -- GitLab