Handling of SAX exceptions
svn: r816
This commit is contained in:
parent
17a815ca05
commit
c315781730
@ -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
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user