changeset 5211:de38d8179cb2

Xapian indexer: work around indexing run crashing when encountering encoding problems with non-ascii filenames
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 07 Oct 2009 18:23:44 +0200
parents e167f58601ef
children ce70252a3e90
files MoinMoin/search/Xapian.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/Xapian.py	Tue Oct 06 21:31:57 2009 +0200
+++ b/MoinMoin/search/Xapian.py	Wed Oct 07 18:23:44 2009 +0200
@@ -366,8 +366,8 @@
                 elif mode == 'add':
                     logging.debug("%s (add)" % (filename, ))
                     id = writer.index(doc)
-        except (OSError, IOError):
-            pass
+        except (OSError, IOError, UnicodeError):
+            logging.exception("_index_file crashed:")
 
     def _get_languages(self, page):
         """ Get language of a page and the language to stem it in