Fixed #1039 -- Changed file-based cache to cache EOFErrors during pickle. Thanks for the patch, Eugene
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1685 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
5cbbd364c3
commit
f2e5382811
|
@ -303,7 +303,7 @@ class _FileCache(_SimpleCache):
|
||||||
os.remove(fname)
|
os.remove(fname)
|
||||||
else:
|
else:
|
||||||
return pickle.load(f)
|
return pickle.load(f)
|
||||||
except (IOError, OSError, pickle.PickleError):
|
except (IOError, OSError, EOFError, pickle.PickleError):
|
||||||
pass
|
pass
|
||||||
return default
|
return default
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue