mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Add pylintrc and fix style for many scripts.
Fix a bug in scm.SVN.DiffItem() Reduce variable aliasing, fix alignments, etc. Review URL: http://codereview.chromium.org/2673002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48943 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@@ -228,7 +228,7 @@ def SubprocessCallAndFilter(command,
|
||||
in_directory,
|
||||
print_messages,
|
||||
print_stdout,
|
||||
fail_status=None, filter=None):
|
||||
fail_status=None, filter_fn=None):
|
||||
"""Runs command, a list, in directory in_directory.
|
||||
|
||||
If print_messages is true, a message indicating what is being done
|
||||
@@ -240,7 +240,7 @@ def SubprocessCallAndFilter(command,
|
||||
Also, if print_stdout is true, the command's stdout is also forwarded
|
||||
to stdout.
|
||||
|
||||
If a filter function is specified, it is expected to take a single
|
||||
If a filter_fn function is specified, it is expected to take a single
|
||||
string argument, and it will be called with each line of the
|
||||
subprocess's output. Each line has had the trailing newline character
|
||||
trimmed.
|
||||
@@ -277,8 +277,8 @@ def SubprocessCallAndFilter(command,
|
||||
sys.stdout.write(in_byte)
|
||||
if in_byte != "\n":
|
||||
in_line += in_byte
|
||||
if in_byte == "\n" and filter:
|
||||
filter(in_line)
|
||||
if in_byte == "\n" and filter_fn:
|
||||
filter_fn(in_line)
|
||||
in_line = ""
|
||||
in_byte = kid.stdout.read(1)
|
||||
rv = kid.wait()
|
||||
|
||||
Reference in New Issue
Block a user