From 2c002a201a34835eb3d8b30e714ca1ebb378e14e Mon Sep 17 00:00:00 2001 From: Justus Kuhlmann Date: Wed, 8 Jul 2026 10:21:00 +0200 Subject: [PATCH] ensure right type for files for ms1 --- corrlib/toml.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/corrlib/toml.py b/corrlib/toml.py index df770de..5d76b33 100644 --- a/corrlib/toml.py +++ b/corrlib/toml.py @@ -222,6 +222,10 @@ def import_toml(path: Path, file: str, copy_file: bool=True) -> None: elif project['code'] == 'openQCD': if md['measurement'] == 'ms1': + if not (isinstance(md['files'], list)): + raise ValueError("files has to be a list of strings") + if not all(isinstance(f, str) for f in md["files"]): + raise ValueError("files has to be a list of strings") if 'param_file' in md.keys(): parameter_file = md['param_file'] if parameter_file.endswith(".ms1.in"):