diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2010-11-09 02:49:26 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-11-09 02:49:26 (GMT) |
commit | 80860381a5582daf34d895f154281deb921cf9ed (patch) | |
tree | fc511bc12eecb759b9fc2b7eaa928eb331a06dff /Lib/xml | |
parent | d67b6786ba6543a8438b0964584eedc849580060 (diff) | |
download | cpython-80860381a5582daf34d895f154281deb921cf9ed.zip cpython-80860381a5582daf34d895f154281deb921cf9ed.tar.gz cpython-80860381a5582daf34d895f154281deb921cf9ed.tar.bz2 |
Merged revisions 86348 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86348 | senthil.kumaran | 2010-11-09 10:36:59 +0800 (Tue, 09 Nov 2010) | 3 lines
Fix Issue10205 - XML QName error when different tags have same QName.
........
Diffstat (limited to 'Lib/xml')
-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 181a461..d89fd3b 100644 --- a/Lib/xml/etree/ElementTree.py +++ b/Lib/xml/etree/ElementTree.py @@ -871,8 +871,9 @@ def _namespaces(elem, encoding, 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, basestring): if tag not in qnames: add_qname(tag) |