diff --git a/pyerrors/input/hadrons.py b/pyerrors/input/hadrons.py index 41b437a2..e9097625 100644 --- a/pyerrors/input/hadrons.py +++ b/pyerrors/input/hadrons.py @@ -45,9 +45,11 @@ def _get_files(path, filestem, idl): raise Exception("Unsorted files") if len(dc) == 1: idx = range(cnfg_numbers[0], cnfg_numbers[-1] + dc[0], dc[0]) - else: + elif idl: idx = idl warnings.warn("Configurations are not evenly spaced.", RuntimeWarning) + else: + raise Exception("Configurations are not evenly spaced.") return filtered_files, idx