Added handling for an EOF exception that can occur when using the django file-based cache.

- Legacy-Id: 15769
This commit is contained in:
Henrik Levkowetz 2018-11-13 13:39:47 +00:00
parent 7b62cbf52d
commit 143a58d3cc

View file

@ -497,7 +497,10 @@ class DocumentInfo(models.Model):
if text:
cache = caches['htmlized']
cache_key = name.split('.')[0]
html = cache.get(cache_key)
try:
html = cache.get(cache_key)
except EOFError:
html = None
if not html:
# The path here has to match the urlpattern for htmlized
# documents in order to produce correct intra-document links