Commit
•
c54e394
1
Parent(s):
720645d
check_file() assert unique
Browse files- utils/general.py +2 -1
utils/general.py
CHANGED
@@ -133,7 +133,8 @@ def check_file(file):
|
|
133 |
else:
|
134 |
files = glob.glob('./**/' + file, recursive=True) # find file
|
135 |
assert len(files), 'File Not Found: %s' % file # assert file was found
|
136 |
-
|
|
|
137 |
|
138 |
|
139 |
def check_dataset(dict):
|
|
|
133 |
else:
|
134 |
files = glob.glob('./**/' + file, recursive=True) # find file
|
135 |
assert len(files), 'File Not Found: %s' % file # assert file was found
|
136 |
+
assert len(files) == 1, "Multiple files match '%s', specify exact path: %s" % (file, files) # assert unique
|
137 |
+
return files[0] # return file
|
138 |
|
139 |
|
140 |
def check_dataset(dict):
|