#26694: FileBasedCache.get() ignores all IOError errno values
-------------------------------+--------------------
Reporter: jdufresne | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
Current
[https://github.com/django/django/blob/359be1c/django/core/cache/backends/filebased.py
implementation]:
{{{
def get(self, key, default=None, version=None):
fname = self._key_to_file(key, version)
try:
with io.open(fname, 'rb') as f:
if not self._is_expired(f):
return pickle.loads(zlib.decompress(f.read()))
except IOError as e:
if e.errno == errno.ENOENT:
pass # Cache file doesn't exist.
return default
}}}
By inspection, this appears to be ignoring all `errno` values. However,
judging from the surrounding code and comments, it should only be ignoring
`ENOENT`. See discussion in [https://github.com/django/django/pull/6652 PR
#6652] for more details.
--
Ticket URL: <https://code.djangoproject.com/ticket/26694>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.2902e941f30a70d83577ce956d811231%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.