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

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

Issue 197693002: [Android] Lint build/android/gyp/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: now using extra_paths_list to avoid F0401s Created 6 years, 9 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_utils.py ('k') | build/android/gyp/util/md5_check_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/util/md5_check.py
diff --git a/build/android/gyp/util/md5_check.py b/build/android/gyp/util/md5_check.py
index d45bb94d2afc57e4e809762826d69fe0fa85e890..9f365aa08162c83b22192b675a1a53a5e9acb87f 100644
--- a/build/android/gyp/util/md5_check.py
+++ b/build/android/gyp/util/md5_check.py
@@ -7,7 +7,8 @@ import os
def CallAndRecordIfStale(
- function, record_path=None, input_paths=[], input_strings=[], force=False):
+ function, record_path=None, input_paths=None, input_strings=None,
+ force=False):
"""Calls function if the md5sum of the input paths/strings has changed.
The md5sum of the inputs is compared with the one stored in record_path. If
@@ -17,6 +18,10 @@ def CallAndRecordIfStale(
If force is True, the function will be called regardless of whether the
md5sum is out of date.
"""
+ if not input_paths:
+ input_paths = []
+ if not input_strings:
+ input_strings = []
md5_checker = _Md5Checker(
record_path=record_path,
input_paths=input_paths,
@@ -49,7 +54,12 @@ def _UpdateMd5ForPath(md5, path):
class _Md5Checker(object):
- def __init__(self, record_path=None, input_paths=[], input_strings=[]):
+ def __init__(self, record_path=None, input_paths=None, input_strings=None):
+ if not input_paths:
+ input_paths = []
+ if not input_strings:
+ input_strings = []
+
assert record_path.endswith('.stamp'), (
'record paths must end in \'.stamp\' so that they are easy to find '
'and delete')
« no previous file with comments | « build/android/gyp/util/build_utils.py ('k') | build/android/gyp/util/md5_check_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698