X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/c9eb7a8fa361ac38b7c0f5a21cc386fc428bbf57..df60910b2d457f031cbe0a153e51e7378c0165d8:/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):