From 02872bc461e06194530a922e99477ccd41f71838 Mon Sep 17 00:00:00 2001 From: jkuhl-uni Date: Sun, 6 Feb 2022 18:08:01 +0100 Subject: [PATCH] small bug fix in sfcf read method --- pyerrors/input/sfcf.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pyerrors/input/sfcf.py b/pyerrors/input/sfcf.py index 2371d101..d8b88d60 100644 --- a/pyerrors/input/sfcf.py +++ b/pyerrors/input/sfcf.py @@ -184,16 +184,16 @@ def read_sfcf(path, prefix, name, quarks='.*', noffset=0, wf=0, wf2=0, break # print(sub_ls) - for exc in sub_ls: - if compact: + if compact: + for exc in sub_ls: if not fnmatch.fnmatch(exc, prefix + '*'): sub_ls = list(set(sub_ls) - set([exc])) - sub_ls.sort(key=lambda x: - int(re.findall(r'\d+', x)[-1])) - else: + sub_ls.sort(key=lambda x: int(re.findall(r'\d+', x)[-1])) + else: + for exc in sub_ls: if not fnmatch.fnmatch(exc, 'cfg*'): sub_ls = list(set(sub_ls) - set([exc])) - sub_ls.sort(key=lambda x: int(x[3:])) + sub_ls.sort(key=lambda x: int(x[3:])) # print(sub_ls) rep_idl = [] no_cfg = len(sub_ls)