mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 06:40:24 +01:00
fix: sfcf_read now correctly throws an exception when append mode files
were not found.
This commit is contained in:
parent
1668b1e7b3
commit
b1221cb76d
1 changed files with 2 additions and 0 deletions
|
@ -290,6 +290,8 @@ def read_sfcf(path, prefix, name, quarks='.*', noffset=0, wf=0, wf2=0,
|
|||
if not fnmatch.fnmatch(exc, prefix + '*.' + name):
|
||||
ls = list(set(ls) - set([exc]))
|
||||
ls.sort(key=lambda x: int(re.findall(r'\d+', x)[-1]))
|
||||
if len(ls) == 0:
|
||||
raise Exception('File(s) for correlator ' + name + ' not found.')
|
||||
pattern = 'name ' + name + '\nquarks ' + quarks + '\noffset ' + str(noffset) + '\nwf ' + str(wf)
|
||||
if b2b:
|
||||
pattern += '\nwf_2 ' + str(wf2)
|
||||
|
|
Loading…
Add table
Reference in a new issue