From 877bf09afa651960a293f47f3d8335f6d0d7e143 Mon Sep 17 00:00:00 2001 From: Jitendra Mishra Date: Mon, 23 Sep 2024 09:04:47 +0530 Subject: [PATCH] Avoid continue loop --- bench/utils/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bench/utils/__init__.py b/bench/utils/__init__.py index aee8f4e8..595db994 100644 --- a/bench/utils/__init__.py +++ b/bench/utils/__init__.py @@ -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