changeset 4965:ae8bf4c7d5a1

catch another 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:59:33 +0200
parents 3b35ab786859
children 23654939130a 149357d4bb4d
files MoinMoin/filter/application_vnd_sun_xml.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/filter/application_vnd_sun_xml.py	Wed Aug 26 13:55:39 2009 +0200
+++ b/MoinMoin/filter/application_vnd_sun_xml.py	Wed Aug 26 13:59:33 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')