From d1eee3b867c3dba176fd213144084520b5744d29 Mon Sep 17 00:00:00 2001
From: Thomas Kluyver <thomas.kluyver@xfel.eu>
Date: Wed, 16 Aug 2023 14:17:22 +0200
Subject: [PATCH] Clearer error when it would run no jobs

---
 src/xfel_calibrate/calibrate.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/xfel_calibrate/calibrate.py b/src/xfel_calibrate/calibrate.py
index c4b8b76bf..5590e4c34 100755
--- a/src/xfel_calibrate/calibrate.py
+++ b/src/xfel_calibrate/calibrate.py
@@ -770,6 +770,9 @@ def run(argv=None):
         cvtype = get_par_attr(parms, concurrency_par, 'type', list)
         cvals = remove_duplications(cvals)
 
+        if not cvals:
+            raise ValueError("Splitting data for concurrency gave 0 jobs")
+
         for cnum, cval in enumerate(cvals):
             show_title = cnum == 0
             cval = [cval, ] if not isinstance(cval, list) and cvtype is list else cval
-- 
GitLab