[Piglit] [PATCH] framework: Fix 'module' object has no attribute 'XMLSyntaxError'.

Jose Fonseca jfonseca at vmware.com
Wed Dec 17 10:47:14 PST 2014


On 17/12/14 18:45, Jose Fonseca wrote:
> On 17/12/14 17:49, Dylan Baker wrote:
>> With one very minor nit,
>> Reviewed-by: Dylan Baker <dylanx.c.baker at intel.com>
>
> Thanks for the review.
>
>> On Wednesday, December 17, 2014 11:05:29 AM Jose Fonseca wrote:
>>> From: José Fonseca <jfonseca at vmware.com>
>>>
>>> etree.XMLSyntaxError is only available with lxml.  etree.ParseError is
>>> available everywhere.  For lxml, etree.XMLSyntaxError is a subclass of
>>> etree.ParseError.
>>
>> Actually, lxml.etree.ParseError is a subclass of
>> lxml.etree.XMLSyntaxError.
>
> Really? Odd, `pydoc lxml.etree` shows otherwise:
>
> $  pydoc lxml.etree
> [...]
> CLASSES
> [...]
>      exceptions.Exception(exceptions.BaseException)
>          Error
>              LxmlError
>                  C14NError
>                  DTDError
>                      DTDParseError
>                      DTDValidateError
>                  DocumentInvalid
>                  LxmlRegistryError
>                      NamespaceRegistryError
>                  LxmlSyntaxError(LxmlError, exceptions.SyntaxError)
>                      ParseError
>                          XMLSyntaxError
>
>
> Jose

Actually, I'm positive XMLSyntaxError is a subclass of ParseError, 
otherwise my patch wouldn't work at all with lxml, and I've verified it 
does.

Jose


More information about the Piglit mailing list