Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: gclient_utils.py

Issue 6799021: Switch from xml.dom.minidom to xml.etree (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fix_encoding.py ('k') | presubmit_canned_checks.py » ('j') | rietveld.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_utils.py
diff --git a/gclient_utils.py b/gclient_utils.py
index 97c8227c097370f2e933f759a5a268e752d72020..6154974823e4d91808ae8a14750a78bef48d9b54 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -14,8 +14,6 @@ import subprocess
import sys
import threading
import time
-import xml.dom.minidom
-import xml.parsers.expat
def hack_subprocess():
@@ -114,29 +112,6 @@ def SplitUrlRevision(url):
return tuple(components)
-def ParseXML(output):
- try:
- return xml.dom.minidom.parseString(output)
- except xml.parsers.expat.ExpatError:
- return None
-
-
-def GetNamedNodeText(node, node_name):
- child_nodes = node.getElementsByTagName(node_name)
- if not child_nodes:
- return None
- assert len(child_nodes) == 1 and child_nodes[0].childNodes.length == 1
- return child_nodes[0].firstChild.nodeValue
-
-
-def GetNodeNamedAttributeText(node, node_name, attribute_name):
- child_nodes = node.getElementsByTagName(node_name)
- if not child_nodes:
- return None
- assert len(child_nodes) == 1
- return child_nodes[0].getAttribute(attribute_name)
-
-
def SyntaxErrorToError(filename, e):
"""Raises a gclient_utils.Error exception with the human readable message"""
try:
« no previous file with comments | « fix_encoding.py ('k') | presubmit_canned_checks.py » ('j') | rietveld.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698