X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Futils.py;h=6fe05723484303839947357124fc9d9ebfadcf4e;hb=4c59dc4c34cfd1f3f1d325e7739d146471bab3c3;hp=8a36e619ae7246da1f18a4d5fd6cee7b364b81b7;hpb=2d7af094879401db25330cfddcdb81bbc1dadb2b;p=youtube-dl 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):