Handling of SAX exceptions

svn: r816
This commit is contained in:
Don Allingham 2002-03-06 00:16:58 +00:00
parent 17a815ca05
commit c315781730

View File

@ -27,9 +27,9 @@ import os
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
try: try:
from xml.sax import make_parser,handler from xml.sax import make_parser,handler,SAXParseException
except: except:
from _xmlplus.sax import make_parser,handler from _xmlplus.sax import make_parser,handler,SAXParseException
FONT_SANS_SERIF = 0 FONT_SANS_SERIF = 0
FONT_SERIF = 1 FONT_SERIF = 1
@ -483,9 +483,7 @@ class StyleSheetList:
parser = make_parser() parser = make_parser()
parser.setContentHandler(SheetParser(self)) parser.setContentHandler(SheetParser(self))
parser.parse(self.file) parser.parse(self.file)
except IOError: except (IOError,OSError,SAXParseException):
pass
except OSError:
pass pass
#------------------------------------------------------------------------ #------------------------------------------------------------------------