Skip to content

Commit 27ab7e0

Browse files
committed
add final check for lock before giving up with an error when wait limit has been reached
1 parent d879cda commit 27ab7e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

easybuild/tools/filetools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1560,7 +1560,7 @@ def check_lock(lock_name):
15601560
time.sleep(wait_interval)
15611561
wait_time += wait_interval
15621562

1563-
if wait_limit != -1 and wait_time >= wait_limit:
1563+
if os.path.exists(lock_path) and wait_limit != -1 and wait_time >= wait_limit:
15641564
error_msg = "Maximum wait time for lock %s to be released reached: %s sec >= %s sec"
15651565
raise EasyBuildError(error_msg, lock_path, wait_time, wait_limit)
15661566
else:

0 commit comments

Comments
 (0)