aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/utils.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-04-07 11:30:46 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-04-07 12:05:44 +0530
commitb506289fe205cc2f3488f72c826034465cef2d0c (patch)
tree59ce6aa49c343d9ad40cd0c7f86cc4d79ad62b31 /yt_dlp/utils.py
parentb63837bce0b104b1f72f2ebb6c0d05080cf2a607 (diff)
downloadhypervideo-pre-b506289fe205cc2f3488f72c826034465cef2d0c.tar.lz
hypervideo-pre-b506289fe205cc2f3488f72c826034465cef2d0c.tar.xz
hypervideo-pre-b506289fe205cc2f3488f72c826034465cef2d0c.zip
[test] Add `test_locked_file`
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r--yt_dlp/utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py
index 02b5ae2ee..84b2603df 100644
--- a/yt_dlp/utils.py
+++ b/yt_dlp/utils.py
@@ -684,8 +684,9 @@ def sanitize_open(filename, open_mode):
try:
try:
if sys.platform == 'win32':
- # FIXME: Windows only has mandatory locking which also locks the file from being read.
- # So for now, don't lock the file on windows. Ref: https://github.com/yt-dlp/yt-dlp/issues/3124
+ # FIXME: An exclusive lock also locks the file from being read.
+ # Since windows locks are mandatory, don't lock the file on windows (for now).
+ # Ref: https://github.com/yt-dlp/yt-dlp/issues/3124
raise LockingUnsupportedError()
stream = locked_file(filename, open_mode, block=False).__enter__()
except LockingUnsupportedError: