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

Side by Side Diff: build/android/cmd_helper.py

Issue 8667008: Fix python scripts in src/build/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 3 # found in the LICENSE file.
5 4
6 5
7 import logging 6 import logging
8 import subprocess 7 import subprocess
9 8
10 9
11 def RunCmd(args, cwd=None): 10 def RunCmd(args, cwd=None):
(...skipping 20 matching lines...) Expand all
32 |cwd| before it's executed. 31 |cwd| before it's executed.
33 """ 32 """
34 logging.info(str(args) + ' ' + (cwd or '')) 33 logging.info(str(args) + ' ' + (cwd or ''))
35 p = subprocess.Popen(args=args, cwd=cwd, stdout=subprocess.PIPE, 34 p = subprocess.Popen(args=args, cwd=cwd, stdout=subprocess.PIPE,
36 stderr=subprocess.PIPE) 35 stderr=subprocess.PIPE)
37 stdout, stderr = p.communicate() 36 stdout, stderr = p.communicate()
38 if stderr: 37 if stderr:
39 logging.critical(stderr) 38 logging.critical(stderr)
40 logging.info(stdout[:4096]) # Truncate output longer than 4k. 39 logging.info(stdout[:4096]) # Truncate output longer than 4k.
41 return stdout 40 return stdout
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698