From c315781730f2e898189bb14cb248c879215a66d3 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 6 Mar 2002 00:16:58 +0000 Subject: [PATCH] Handling of SAX exceptions svn: r816 --- gramps/src/TextDoc.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gramps/src/TextDoc.py b/gramps/src/TextDoc.py index ef407aaa3..5a35fc8cb 100644 --- a/gramps/src/TextDoc.py +++ b/gramps/src/TextDoc.py @@ -27,9 +27,9 @@ import os # #------------------------------------------------------------------------- try: - from xml.sax import make_parser,handler + from xml.sax import make_parser,handler,SAXParseException except: - from _xmlplus.sax import make_parser,handler + from _xmlplus.sax import make_parser,handler,SAXParseException FONT_SANS_SERIF = 0 FONT_SERIF = 1 @@ -483,9 +483,7 @@ class StyleSheetList: parser = make_parser() parser.setContentHandler(SheetParser(self)) parser.parse(self.file) - except IOError: - pass - except OSError: + except (IOError,OSError,SAXParseException): pass #------------------------------------------------------------------------