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

Unified Diff: build/android/gyp/util/build_utils.py

Issue 153743008: Revert of Enable presubmit pylint in build/android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merging with changes to pylib/linker/test_case.py. Created 6 years, 10 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 | « build/android/gyp/util/build_device.py ('k') | build/android/gyp/util/md5_check.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/util/build_utils.py
diff --git a/build/android/gyp/util/build_utils.py b/build/android/gyp/util/build_utils.py
index 165fa244d458048d59137f3709e50ade0c6f0574..0bf94821f3fa86617446b6a779e3b4ebc37c58ea 100644
--- a/build/android/gyp/util/build_utils.py
+++ b/build/android/gyp/util/build_utils.py
@@ -10,6 +10,7 @@ import shlex
import shutil
import subprocess
import sys
+import traceback
def MakeDirectory(dir_path):
@@ -30,18 +31,18 @@ def Touch(path):
os.utime(path, None)
-def FindInDirectory(directory, filename_filter):
+def FindInDirectory(directory, filter):
files = []
- for root, _dirnames, filenames in os.walk(directory):
- matched_files = fnmatch.filter(filenames, filename_filter)
+ for root, dirnames, filenames in os.walk(directory):
+ matched_files = fnmatch.filter(filenames, filter)
files.extend((os.path.join(root, f) for f in matched_files))
return files
-def FindInDirectories(directories, filename_filter):
+def FindInDirectories(directories, filter):
all_files = []
for directory in directories:
- all_files.extend(FindInDirectory(directory, filename_filter))
+ all_files.extend(FindInDirectory(directory, filter))
return all_files
@@ -55,9 +56,7 @@ def ParseGypList(gyp_string):
return shlex.split(gyp_string)
-def CheckOptions(options, parser, required=None):
- if not required:
- return
+def CheckOptions(options, parser, required=[]):
for option_name in required:
if not getattr(options, option_name):
parser.error('--%s is required' % option_name.replace('_', '-'))
@@ -84,7 +83,6 @@ class CalledProcessError(Exception):
exits with a non-zero exit code."""
def __init__(self, cwd, args, output):
- super(CalledProcessError, self).__init__()
self.cwd = cwd
self.args = args
self.output = output
@@ -131,8 +129,8 @@ def IsTimeStale(output, inputs):
return True
output_time = GetModifiedTime(output)
- for i in inputs:
- if GetModifiedTime(i) > output_time:
+ for input in inputs:
+ if GetModifiedTime(input) > output_time:
return True
return False
« no previous file with comments | « build/android/gyp/util/build_device.py ('k') | build/android/gyp/util/md5_check.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698