X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/c9eb7a8fa361ac38b7c0f5a21cc386fc428bbf57..333f7cc2ab4d123e4ffddd4f09371d06750b3631:/src/search/index.py?ds=inline 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):