OLD | NEW |
1 # coding=utf8 | 1 # coding=utf8 |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 """Collection of subprocess wrapper functions. | 5 """Collection of subprocess wrapper functions. |
6 | 6 |
7 In theory you shouldn't need anything else in subprocess, or this module failed. | 7 In theory you shouldn't need anything else in subprocess, or this module failed. |
8 """ | 8 """ |
9 | 9 |
10 import cStringIO | 10 import cStringIO |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 | 503 |
504 Captures stdout of a process call and returns stdout only. | 504 Captures stdout of a process call and returns stdout only. |
505 | 505 |
506 - Throws if return code is not 0. | 506 - Throws if return code is not 0. |
507 - Works even prior to python 2.7. | 507 - Works even prior to python 2.7. |
508 - Blocks stdin by default if not specified since no output will be visible. | 508 - Blocks stdin by default if not specified since no output will be visible. |
509 - As per doc, "The stdout argument is not allowed as it is used internally." | 509 - As per doc, "The stdout argument is not allowed as it is used internally." |
510 """ | 510 """ |
511 kwargs.setdefault('stdin', VOID) | 511 kwargs.setdefault('stdin', VOID) |
512 if 'stdout' in kwargs: | 512 if 'stdout' in kwargs: |
513 raise ValueError('stdout argument not allowed, it will be overridden.') | 513 raise ValueError('stdout argument not allowed, it would be overridden.') |
514 return check_call_out(args, stdout=PIPE, **kwargs)[0] | 514 return check_call_out(args, stdout=PIPE, **kwargs)[0] |
OLD | NEW |