changeset 4964:3b35ab786859

catch exception when a bad zip file is encountered while indexing (ignore it)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 26 Aug 2009 13:55:39 +0200
parents ca4d2f593508
children ae8bf4c7d5a1
files MoinMoin/filter/application_vnd_oasis_opendocument.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/filter/application_vnd_oasis_opendocument.py	Thu Aug 20 14:42:36 2009 +0200
+++ b/MoinMoin/filter/application_vnd_oasis_opendocument.py	Wed Aug 26 13:55:39 2009 +0200
@@ -21,8 +21,8 @@
         data = zf.read("content.xml")
         zf.close()
         data = " ".join(rx_stripxml.sub(" ", data).split())
-    except RuntimeError, err:
-        logging.error(str(err))
+    except (zipfile.BadZipfile, RuntimeError), err:
+        logging.error("%s [%s]" % (str(err), filename))
         data = ""
     return data.decode('utf-8')