Working menu.
[wolnelektury.git] / src / search / index.py
index 06d2c4a..2be60fd 100644 (file)
@@ -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):