diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2010-11-09 02:36:59 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-11-09 02:36:59 (GMT) |
commit | ec30b3dd8c53b816d6c3f787ccc53772b62c161b (patch) | |
tree | 82c225245275ac7366ef696a7fda90b7f4b525c5 /Lib/xml/etree/ElementTree.py | |
parent | 92665ab8c7aa6bcf393fc53ea7227b7768d3bb8b (diff) | |
download | cpython-ec30b3dd8c53b816d6c3f787ccc53772b62c161b.zip cpython-ec30b3dd8c53b816d6c3f787ccc53772b62c161b.tar.gz cpython-ec30b3dd8c53b816d6c3f787ccc53772b62c161b.tar.bz2 |
Fix Issue10205 - XML QName error when different tags have same QName.
Diffstat (limited to 'Lib/xml/etree/ElementTree.py')
-rw-r--r-- | Lib/xml/etree/ElementTree.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/xml/etree/ElementTree.py b/Lib/xml/etree/ElementTree.py index 9f5717e..75fbea9 100644 --- a/Lib/xml/etree/ElementTree.py +++ b/Lib/xml/etree/ElementTree.py @@ -913,8 +913,9 @@ def _namespaces(elem, default_namespace=None): iterate = elem.getiterator # cET compatibility for elem in iterate(): tag = elem.tag - if isinstance(tag, QName) and tag.text not in qnames: - add_qname(tag.text) + if isinstance(tag, QName): + if tag.text not in qnames: + add_qname(tag.text) elif isinstance(tag, str): if tag not in qnames: add_qname(tag) |