xml.etree.ElementTree.ParseError not supported in Python 2.6
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Soren Hansen |
Bug Description
Unit tests fail in Python 2.6.5. Example:
Traceback (most recent call last):
File "nova/tests/
import fakelibvirt
File "nova/tests/
from xml.etree.
ImportError: cannot import name ParseError
It looks like some code is using some ElementTree functionality that isn't in Python 2.6.x. Here's Python 2.6.6 on RHEL 6.1:
$ python
Python 2.6.6 (r266:84292, Apr 11 2011, 15:50:32)
[GCC 4.4.4 20100726 (Red Hat 4.4.4-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from xml.etree.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name ParseError
summary: |
- xml.etree.ElementTree.ParseError not support in Python 2.6 + xml.etree.ElementTree.ParseError not supported in Python 2.6 |
Changed in nova: | |
milestone: | none → essex-2 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
assignee: | nobody → Soren Hansen (soren) |
Changed in nova: | |
milestone: | essex-2 → 2012.1 |
Reviewed: https:/ /review. openstack. org/1854 github. com/openstack/ nova/commit/ b6ae26ba279246d 1b9e32b8665316a 47847147ce
Committed: http://
Submitter: Jenkins
Branch: master
status fixcommitted
done
commit b6ae26ba279246d 1b9e32b8665316a 47847147ce
Author: Soren Hansen <email address hidden>
Date: Tue Nov 22 22:53:22 2011 +0100
Make fakelibvirt python2.6 compatible
Fix bug #893757. In Python 2.6 xml.etree. ElementTree. fromstring expat.ExpatErro r instead of etree.ElementTr ee.ParseError when faced with invalid xml.
raises xml.parsers.
xml.
Adjust accordingly.
Change-Id: I1e4ae532e00161 8bded2b60e55491 5e5d6f7e038