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

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

Issue 1314913009: [Android] Move some pylib modules into devil/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « build/android/devil/base_error.py ('k') | build/android/devil/utils/cmd_helper_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # 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
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """A wrapper for subprocess to make calling shell commands easier.""" 5 """A wrapper for subprocess to make calling shell commands easier."""
6 6
7 import logging 7 import logging
8 import os 8 import os
9 import pipes 9 import pipes
10 import select 10 import select
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 buffer_output += data 281 buffer_output += data
282 has_incomplete_line = buffer_output[-1] not in '\r\n' 282 has_incomplete_line = buffer_output[-1] not in '\r\n'
283 lines = buffer_output.splitlines() 283 lines = buffer_output.splitlines()
284 buffer_output = lines.pop() if has_incomplete_line else '' 284 buffer_output = lines.pop() if has_incomplete_line else ''
285 for line in lines: 285 for line in lines:
286 yield line 286 yield line
287 if buffer_output: 287 if buffer_output:
288 yield buffer_output 288 yield buffer_output
289 if check_status and process.returncode: 289 if check_status and process.returncode:
290 raise subprocess.CalledProcessError(process.returncode, cmd) 290 raise subprocess.CalledProcessError(process.returncode, cmd)
OLDNEW
« no previous file with comments | « build/android/devil/base_error.py ('k') | build/android/devil/utils/cmd_helper_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698