From 0375532c5d86aa6966dfd3c7f6d6b38ab09da654 Mon Sep 17 00:00:00 2001 From: Patrick Armstrong Date: Sat, 11 May 2024 20:33:26 -0500 Subject: [PATCH] Warn if no CreateCov tasks match mask --- pippin/cosmofitters/wfit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pippin/cosmofitters/wfit.py b/pippin/cosmofitters/wfit.py index ccd46d42..8f9a585b 100644 --- a/pippin/cosmofitters/wfit.py +++ b/pippin/cosmofitters/wfit.py @@ -115,11 +115,11 @@ def _get_wfit_dir(base_output_dir, stage_number, name): mask = config.get("MASK", "") ctasks = [ctask for ctask in create_cov_tasks if mask in ctask.name] + if len(ctasks) == 0: + Task.fail_config(f"WFit task {name} has no create_cov task to run on!") t = WFit(name, _get_wfit_dir(base_output_dir, stage_number, name), ctasks, config, options, global_config) Task.logger.info(f"Creating WFit task {name} {t.num_jobs} jobs") tasks.append(t) - if len(create_cov_tasks) == 0: - Task.fail_config(f"WFit task {name} has no create_cov task to run on!") return tasks