Skip to content

Commit

Permalink
Avoid continue loop
Browse files Browse the repository at this point in the history
  • Loading branch information
jmishra01 authored Sep 23, 2024
1 parent bb2e324 commit 877bf09
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bench/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ def is_bench_directory(directory=os.path.curdir):
for folder in paths_in_bench:
path = os.path.abspath(os.path.join(directory, folder))
is_bench = is_bench and os.path.exists(path)
# Once is_bench becomes false, it will always be false, even if other path exists.
if not is_bench:
break

return is_bench

Expand Down

0 comments on commit 877bf09

Please sign in to comment.