Skip to content

Commit

Permalink
Revert "Fix cElementTree imports"
Browse files Browse the repository at this point in the history
This reverts commit 6d365f0.
  • Loading branch information
mvdbeek committed May 1, 2017
1 parent 8411b02 commit 15e2c9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/galaxy/util/__init__.py
Expand Up @@ -31,8 +31,8 @@
from hashlib import md5
from os.path import normpath, relpath
from xml.etree import (
cElementTree,
ElementInclude,
cElementTree as ElementTree
)
from xml.etree.ElementTree import ParseError

Expand Down Expand Up @@ -208,9 +208,9 @@ def unique_id(KEY_SIZE=128):

def parse_xml( fname ):
"""Returns a parsed xml tree"""
tree = cElementTree.ElementTree()
tree = ElementTree.ElementTree()
try:
root = tree.parse( fname, parser=cElementTree.XMLParser( ) )
root = tree.parse( fname, parser=ElementTree.XMLParser( ) )
except ParseError:
log.exception("Error parsing file %s", fname)
raise
Expand All @@ -219,7 +219,7 @@ def parse_xml( fname ):


def parse_xml_string(xml_string):
tree = cElementTree.fromstring(xml_string)
tree = ElementTree.fromstring(xml_string)
return tree


Expand All @@ -228,7 +228,7 @@ def xml_to_string( elem, pretty=False ):
if pretty:
elem = pretty_print_xml( elem )
try:
return cElementTree.tostring( elem )
return ElementTree.tostring( elem )
except TypeError as e:
# we assume this is a comment
if hasattr( elem, 'text' ):
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/util/xml_macros.py
@@ -1,7 +1,7 @@
import os

from copy import deepcopy
from xml.etree import cElementTree, ElementInclude
from xml.etree import ElementInclude, cElementTree


REQUIRED_PARAMETER = object()
Expand Down

0 comments on commit 15e2c9b

Please sign in to comment.