diff options
| author | scoder <none@none> | 2010-03-26 20:35:56 +0100 |
|---|---|---|
| committer | scoder <none@none> | 2010-03-26 20:35:56 +0100 |
| commit | 42f329b47a6ca35930fec68753e1016ba87f5f2b (patch) | |
| tree | 176fe185f1a60be3fa0201badbc287683823e0e6 /src/lxml/parser.pxi | |
| parent | b9706d912a88dcf84cd8bc38b70ed7b157e9df9a (diff) | |
| download | python-lxml-42f329b47a6ca35930fec68753e1016ba87f5f2b.tar.gz | |
[svn r4384] r5534@lenny: sbehnel | 2010-03-26 08:11:00 +0100
parser exception refactoring to better match ET 1.3
--HG--
branch : trunk
Diffstat (limited to 'src/lxml/parser.pxi')
| -rw-r--r-- | src/lxml/parser.pxi | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lxml/parser.pxi b/src/lxml/parser.pxi index 909ed2df..3e983c39 100644 --- a/src/lxml/parser.pxi +++ b/src/lxml/parser.pxi @@ -15,22 +15,22 @@ class ParseError(LxmlSyntaxError): For compatibility with ElementTree 1.3 and later. """ - pass - -class XMLSyntaxError(ParseError): - u"""Syntax error while parsing an XML document. - """ def __init__(self, message, code, line, column): if python.PY_VERSION_HEX >= 0x02050000: # Python >= 2.5 uses new style class exceptions - super(_XMLSyntaxError, self).__init__(message) + super(_ParseError, self).__init__(message) else: - ParseError.__init__(self, message) + _XMLSyntaxError.__init__(self, message) self.position = (line, column) self.code = code -cdef object _XMLSyntaxError -_XMLSyntaxError = XMLSyntaxError +class XMLSyntaxError(ParseError): + u"""Syntax error while parsing an XML document. + """ + pass + +cdef object _XMLSyntaxError = XMLSyntaxError +cdef object _ParseError = ParseError class ParserError(LxmlError): u"""Internal lxml parser error. |
