Skip to content

Commit 54062cf

Browse files
authored
Merge pull request #812 from daveed12/fix_cache
Fix for cache bug in s3fs
2 parents b9e1cf5 + 412bacc commit 54062cf

File tree

1 file changed

+4
-0
lines changed
  • hubblestack/extmods/fileserver

1 file changed

+4
-0
lines changed

hubblestack/extmods/fileserver/s3fs.py

+4
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,10 @@ def _read_buckets_cache_file(cache_file):
575575
with salt.utils.files.fopen(cache_file, 'rb') as fp_:
576576
try:
577577
data = pickle.load(fp_)
578+
# check for 'corrupted' cache data ex: {u'base':[]}
579+
if not any(data.values()):
580+
data = None
581+
578582
except (pickle.UnpicklingError, AttributeError, EOFError, ImportError,
579583
IndexError, KeyError):
580584
data = None

0 commit comments

Comments
 (0)