Skip to content

Commit

Permalink
Catch error if no replica are found in the geiven directory (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuhl-uni authored Mar 25, 2024
1 parent 0df5882 commit 254a19f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyerrors/input/sfcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ def read_sfcf_multi(path, prefix, name_list, quarks_list=['.*'], corr_type_list=

else:
replica = len([file.split(".")[-1] for file in ls]) // len(set([file.split(".")[-1] for file in ls]))
if replica == 0:
raise Exception('No replica found in directory')
if not silent:
print('Read', part, 'part of', name_list, 'from', prefix[:-1], ',', replica, 'replica')

Expand Down

0 comments on commit 254a19f

Please sign in to comment.