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