mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
small bug fix in sfcf read method
This commit is contained in:
parent
a839592ea8
commit
02872bc461
1 changed files with 6 additions and 6 deletions
|
@ -184,16 +184,16 @@ def read_sfcf(path, prefix, name, quarks='.*', noffset=0, wf=0, wf2=0,
|
||||||
break
|
break
|
||||||
|
|
||||||
# print(sub_ls)
|
# print(sub_ls)
|
||||||
for exc in sub_ls:
|
if compact:
|
||||||
if compact:
|
for exc in sub_ls:
|
||||||
if not fnmatch.fnmatch(exc, prefix + '*'):
|
if not fnmatch.fnmatch(exc, prefix + '*'):
|
||||||
sub_ls = list(set(sub_ls) - set([exc]))
|
sub_ls = list(set(sub_ls) - set([exc]))
|
||||||
sub_ls.sort(key=lambda x:
|
sub_ls.sort(key=lambda x: int(re.findall(r'\d+', x)[-1]))
|
||||||
int(re.findall(r'\d+', x)[-1]))
|
else:
|
||||||
else:
|
for exc in sub_ls:
|
||||||
if not fnmatch.fnmatch(exc, 'cfg*'):
|
if not fnmatch.fnmatch(exc, 'cfg*'):
|
||||||
sub_ls = list(set(sub_ls) - set([exc]))
|
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)
|
# print(sub_ls)
|
||||||
rep_idl = []
|
rep_idl = []
|
||||||
no_cfg = len(sub_ls)
|
no_cfg = len(sub_ls)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue