projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
18842: Clean up keep cache set() a little bit
[arvados.git]
/
sdk
/
python
/
arvados
/
diskcache.py
diff --git
a/sdk/python/arvados/diskcache.py
b/sdk/python/arvados/diskcache.py
index 74b2a77b28506b2b5fd15b64b7977d877ea0ace8..f3984bbca493237a868d4c705a710be899fda637 100644
(file)
--- a/
sdk/python/arvados/diskcache.py
+++ b/
sdk/python/arvados/diskcache.py
@@
-66,6
+66,8
@@
class DiskCacheSlot(object):
tmpfile = None
self.content = mmap.mmap(self.filehandle.fileno(), 0, access=mmap.ACCESS_READ)
tmpfile = None
self.content = mmap.mmap(self.filehandle.fileno(), 0, access=mmap.ACCESS_READ)
+ # only set the event when mmap is successful
+ self.ready.set()
finally:
if tmpfile is not None:
# If the tempfile hasn't been renamed on disk yet, try to delete it.
finally:
if tmpfile is not None:
# If the tempfile hasn't been renamed on disk yet, try to delete it.