← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1119262] Re: wsgi.XMLDeserializer tries to access non existing attributes of xml node

 

** Changed in: quantum
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to quantum.
https://bugs.launchpad.net/bugs/1119262

Title:
  wsgi.XMLDeserializer tries to access non existing attributes of xml
  node

Status in OpenStack Quantum (virtual network service):
  Fix Released

Bug description:
  extract_text method of wsgi.XMLDeserializer tries to access
  "childNodes" attribute of "node" object which is supposed to be of
  type xml.etree.ElementTree.Element which in turn doesn't have such
  attribute.
  (https://github.com/openstack/quantum/blob/master/quantum/wsgi.py#L567)

  
  The error seems to be caused by refactoring in this change (https://review.openstack.org/#/c/19998/) which replaced library for parsing xml from minidom to etree but left some calls to minidom unchanged.

  Here is the trace, obtained by calling extract_text:

  Error
  Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/unittest2/case.py", line 340, in run
      testMethod()
    File "/home/repos/quantum/quantum/tests/unit/test_wsgi.py", line 658, in test_extract_text
      deserializer.extract_text(doc), 'test_child')
    File "/home/repos/quantum/quantum/wsgi.py", line 567, in extract_text
      if len(node.childNodes) == 1:
  AttributeError: 'Element' object has no attribute 'childNodes'

To manage notifications about this bug go to:
https://bugs.launchpad.net/quantum/+bug/1119262/+subscriptions