From 937c7adbb6f115780889635aad0d6b686e082903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Tue, 11 Jun 2024 11:02:07 +0200 Subject: [PATCH] chg: make sure the lock file is empty --- lookyloo/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lookyloo/helpers.py b/lookyloo/helpers.py index 74b0f265..e11eb18b 100644 --- a/lookyloo/helpers.py +++ b/lookyloo/helpers.py @@ -322,7 +322,7 @@ def is_locked(locked_dir_path: Path, /) -> bool: max_wait_content = 5 while max_wait_content > 0: with lock_file.open('r') as f: - if content := f.read(): + if content := f.read().strip(): break # The file is empty, we're between the creation and setting the content logger.info(f'Lock file empty ({lock_file}), waiting...')