summaryrefslogtreecommitdiffstats
path: root/Lib/xml
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2013-05-19 16:24:43 (GMT)
committerEli Bendersky <eliben@gmail.com>2013-05-19 16:24:43 (GMT)
commitc4e98a6a9bb73fb0bc1ea3d2d6fb63107416cddc (patch)
treeaf114b06709ec5dece3b9972945f5c4af781eccb /Lib/xml
parent46955b2d30c0185d6471ce42c7766633b499e232 (diff)
downloadcpython-c4e98a6a9bb73fb0bc1ea3d2d6fb63107416cddc.zip
cpython-c4e98a6a9bb73fb0bc1ea3d2d6fb63107416cddc.tar.gz
cpython-c4e98a6a9bb73fb0bc1ea3d2d6fb63107416cddc.tar.bz2
Cleanup more old ET library leftovers
Diffstat (limited to 'Lib/xml')
-rw-r--r--Lib/xml/etree/ElementTree.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/Lib/xml/etree/ElementTree.py b/Lib/xml/etree/ElementTree.py
index e0b4fd4..9ea0dc8 100644
--- a/Lib/xml/etree/ElementTree.py
+++ b/Lib/xml/etree/ElementTree.py
@@ -85,7 +85,7 @@ __all__ = [
"TreeBuilder",
"VERSION",
"XML", "XMLID",
- "XMLParser", "XMLTreeBuilder",
+ "XMLParser",
"register_namespace",
]
@@ -1654,9 +1654,7 @@ try:
# Element, SubElement, ParseError, TreeBuilder, XMLParser
from _elementtree import *
-except ImportError:
- pass
-else:
+
# Overwrite 'ElementTree.parse' to use the C XMLParser
class ElementTree(ElementTree):
__doc__ = ElementTree.__doc__
@@ -1681,11 +1679,10 @@ else:
finally:
if close_source:
source.close()
+except ImportError:
+ pass
-# compatibility
-XMLTreeBuilder = XMLParser
-
# workaround circular import.
try:
from ElementC14N import _serialize_c14n