X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/c9eb7a8fa361ac38b7c0f5a21cc386fc428bbf57..10d01e2faef06d1db0958908394f1f79441cd744:/src/search/index.py diff --git a/src/search/index.py b/src/search/index.py index 06d2c4a6e..2be60fdf7 100644 --- a/src/search/index.py +++ b/src/search/index.py @@ -95,7 +95,10 @@ class Snippets(object): of the snippet stored there. """ self.file.seek(pos[0], 0) - txt = self.file.read(pos[1]).decode('utf-8') + try: + txt = self.file.read(pos[1]).decode('utf-8') + except: + return '' return txt def close(self):