summary refs log tree commit diff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-09-01 01:41:25 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-09-01 01:41:25 +0200
commit2582bebe06cf06cd2bdce9ada7764fccc3730ef4 (patch)
treee6933d00675c10d1d59bd7814629457ddc5639f9
parentc9cc0bf57b908eabc3765893289449a2c31d402a (diff)
downloadyoutube-dl-2582bebe06cf06cd2bdce9ada7764fccc3730ef4.tar.gz
youtube-dl-2582bebe06cf06cd2bdce9ada7764fccc3730ef4.tar.xz
youtube-dl-2582bebe06cf06cd2bdce9ada7764fccc3730ef4.zip
[utils] Use flock instead of lockf (Fixes #3621)
-rw-r--r--youtube_dl/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 8a36e619a..6fe057234 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -1141,10 +1141,10 @@ else:
     import fcntl
 
     def _lock_file(f, exclusive):
-        fcntl.lockf(f, fcntl.LOCK_EX if exclusive else fcntl.LOCK_SH)
+        fcntl.flock(f, fcntl.LOCK_EX if exclusive else fcntl.LOCK_SH)
 
     def _unlock_file(f):
-        fcntl.lockf(f, fcntl.LOCK_UN)
+        fcntl.flock(f, fcntl.LOCK_UN)
 
 
 class locked_file(object):