Fix --rm-cache-dir error message
[youtube-dl] / youtube_dl / utils.py
index 8a36e619ae7246da1f18a4d5fd6cee7b364b81b7..6fe05723484303839947357124fc9d9ebfadcf4e 100644 (file)
@@ -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):