Simplify importing of etree
Removed import of xml.etree.cElementTree as it was was
deprecated in python 3.3.
Also, since xml.etree.ElementTree has been a thing for a long time there is
no good reason to try fallbacks if it fails to import.
@@ -14,25 +14,7 @@ else:
try:
from lxml import etree
except ImportError:
- try:
- # Python 2.5
- import xml.etree.cElementTree as etree
- except ImportError:
- try:
- # Python 2.5
import xml.etree.ElementTree as etree
- except ImportError:
- try:
- # normal cElementTree install
- import cElementTree as etree
- except ImportError:
- try:
- # normal ElementTree install
- import elementtree.ElementTree as etree
- except ImportError:
- raise Exception(
- "Failed to import ElementTree from any known place"
- )
try:
