mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 14:50:25 +01:00
fix: in input.hadrons._get_files the suffix '.h5. is now conditionally
removed.
This commit is contained in:
parent
912629b845
commit
c4c06b5864
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ def _get_files(path, filestem, idl):
|
|||
raise Exception('No files starting with', filestem, 'in folder', path)
|
||||
|
||||
def get_cnfg_number(n):
|
||||
return int(n[len(filestem) + 1:-3])
|
||||
return int(n.replace(".h5", "")[len(filestem) + 1:]) # From python 3.9 onward the safer 'removesuffix' method can be used.
|
||||
|
||||
# Sort according to configuration number
|
||||
files.sort(key=get_cnfg_number)
|
||||
|
|
Loading…
Add table
Reference in a new issue