[4suite] bug: Element.removeAttributeNS throws wrong exception

Mike Olson Mike.Olson at fourthought.com
Wed Sep 6 10:30:36 MDT 2000


Alexandre Fayolle wrote:

Thanks Alexandre, I've fixed this bug.

Mike

> 
> Hello, I got this traceback after removing an attribute which doesn't
> exist :

> 
>   File "lib/gui/PropertyEditor.py", line 146, in update
>     element.removeAttributeNS('',attr)
>   File "/home/alf/xmlSig/repository/xml/xml/dom/Element.py", line 245, in
> removeAttributeNS
>     old = self.attributes.removeNamedItemNS(namespaceURI,localName)
>   File "/home/alf/xmlSig/repository/xml/xml/dom/NamedNodeMap.py", line
> 171, in removeNamedItemNS
>     raise DOMException(NOT_FOUND_ERR)
> xml.dom.DOMException
> 
> However, according to the DOM2 recomendation, removeAttributeNS is not
> supposed to raise this exception (it can only raise a
> NO_MODIFICATION_ALLOWED_ERR if the node is readonly), so I think there
> should be a try... except block around line 245 in Element.py.
> 
> --
> Alexandre Fayolle
> Logilab
> 
> _______________________________________________
> 4suite mailing list
> 4suite at lists.fourthought.com
> http://lists.fourthought.com/mailman/listinfo/4suite

-- 
Mike Olson				 Principal Consultant
mike.olson at fourthought.com               (303)583-9900 x 102
Fourthought, Inc.                         http://Fourthought.com 
Software-engineering, knowledge-management, XML, CORBA, Linux, Python



More information about the 4suite mailing list