X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2693a197ea37490a891c54bbb279937a7b4e897c..2cddd3c4e531e37c6d960c08da91a552bf75a1cc:/sdk/python/arvados/diskcache.py diff --git a/sdk/python/arvados/diskcache.py b/sdk/python/arvados/diskcache.py index 9734d93a77..939ca3bb3c 100644 --- a/sdk/python/arvados/diskcache.py +++ b/sdk/python/arvados/diskcache.py @@ -9,6 +9,7 @@ import traceback import stat import tempfile import fcntl +import time import errno import logging @@ -143,7 +144,7 @@ class DiskCacheSlot(object): # The locking strategy ensures that cache blocks # in use remain visible. # - fcntl.flock(filehandle, fcntl.LOCK_EX | fcntl.LOCK_NB) + fcntl.flock(f, fcntl.LOCK_EX | fcntl.LOCK_NB) os.remove(final) return True