Index: build/android/pylib/cmd_helper.py |
diff --git a/build/android/pylib/cmd_helper.py b/build/android/pylib/cmd_helper.py |
index b6bbac7b0f170f174000198e0f1f5fd1200997e4..6dcc911d6287c10d80f53bfe2a5fc8883fa21c90 100644 |
--- a/build/android/pylib/cmd_helper.py |
+++ b/build/android/pylib/cmd_helper.py |
@@ -10,6 +10,7 @@ import subprocess |
import constants |
+ |
def RunCmd(args, cwd=None): |
"""Opens a subprocess to execute a program and returns its return value. |
@@ -23,8 +24,7 @@ def RunCmd(args, cwd=None): |
Return code from the command execution. |
""" |
logging.info(str(args) + ' ' + (cwd or '')) |
- p = subprocess.Popen(args=args, cwd=cwd) |
- return p.wait() |
+ return subprocess.call(args, cwd=cwd) |
def GetCmdOutput(args, cwd=None, shell=False): |
@@ -44,6 +44,7 @@ def GetCmdOutput(args, cwd=None, shell=False): |
(_, output) = GetCmdStatusAndOutput(args, cwd, shell) |
return output |
+ |
def GetCmdStatusAndOutput(args, cwd=None, shell=False): |
"""Executes a subprocess and returns its exit code and output. |
@@ -67,6 +68,7 @@ def GetCmdStatusAndOutput(args, cwd=None, shell=False): |
logging.info(stdout[:4096]) # Truncate output longer than 4k. |
return (exit_code, stdout) |
+ |
class OutDirectory(object): |
_out_directory = os.path.join(constants.CHROME_DIR, 'out') |
@staticmethod |