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

Unified Diff: build/android/pylib/utils/flakiness_dashboard_results_uploader.py

Issue 13861026: [Android] Switch all subprocess.Popen calls to use a temporary file instead of PIPE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | « build/android/pylib/utils/findbugs.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/utils/flakiness_dashboard_results_uploader.py
diff --git a/build/android/pylib/utils/flakiness_dashboard_results_uploader.py b/build/android/pylib/utils/flakiness_dashboard_results_uploader.py
index 03f3740e3fb4d556e72b9554392195ae12c939ca..291308ecf3bac94860f24ddaeaee548766966d9d 100644
--- a/build/android/pylib/utils/flakiness_dashboard_results_uploader.py
+++ b/build/android/pylib/utils/flakiness_dashboard_results_uploader.py
@@ -30,6 +30,7 @@ from webkitpy.common.system import executive, filesystem
from webkitpy.layout_tests.layout_package import json_results_generator
#TODO(craigdh): pylib/utils/ should not depend on pylib/.
+from pylib import cmd_helper
from pylib import constants
@@ -97,9 +98,7 @@ class JSONResultsGenerator(json_results_generator.JSONResultsGeneratorBase):
in_directory: The directory where git is to be run.
"""
command_line = ['git', 'log', '-1', '--pretty=format:%H']
- output = subprocess.Popen(command_line,
- cwd=in_directory,
- stdout=subprocess.PIPE).communicate()[0]
+ output = cmd_helper.GetCmdOutput(command_line, cwd=in_directory)
return output[0:40]
in_directory = os.path.join(constants.CHROME_DIR, in_directory)
@@ -110,10 +109,7 @@ class JSONResultsGenerator(json_results_generator.JSONResultsGeneratorBase):
else:
return ''
- # Note: Not thread safe: http://bugs.python.org/issue2320
- output = subprocess.Popen(['svn', 'info', '--xml'],
- cwd=in_directory,
- stdout=subprocess.PIPE).communicate()[0]
+ output = cmd_helper.GetCmdOutput(['svn', 'info', '--xml'], cwd=in_directory)
try:
dom = xml.dom.minidom.parseString(output)
return dom.getElementsByTagName('entry')[0].getAttribute('revision')
« no previous file with comments | « build/android/pylib/utils/findbugs.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698