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

Unified Diff: gclient_utils.py

Issue 2673002: Add pylintrc and fix style for many scripts. (Closed)
Patch Set: . Created 10 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gclient_scm.py ('k') | pylintrc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_utils.py
diff --git a/gclient_utils.py b/gclient_utils.py
index a052d42cab7caf8d70259793b8bf8fb260efa4c1..276d015c779d4446f9699760283e97001f97f392 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -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()
« no previous file with comments | « gclient_scm.py ('k') | pylintrc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698