Skip to content

Commit

Permalink
check_file() assert unique
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Sep 11, 2020
1 parent 720645d commit c54e394
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ def check_file(file):
else:
files = glob.glob('./**/' + file, recursive=True) # find file
assert len(files), 'File Not Found: %s' % file # assert file was found
return files[0] # return first file if multiple found
assert len(files) == 1, "Multiple files match '%s', specify exact path: %s" % (file, files) # assert unique
return files[0] # return file


def check_dataset(dict):
Expand Down

0 comments on commit c54e394

Please sign in to comment.