Merge "Adds official comment support to the whitelist format."
This commit is contained in:
@@ -65,6 +65,8 @@ def make_filter_from_whitelists(whitelists, all_targets):
|
||||
Whitelist can contain pathname patterns or ignored lines. Pathnames are case
|
||||
insensitive.
|
||||
|
||||
Whitelist can contain single-line comments. Comment lines begin with #
|
||||
|
||||
For example, this ignores the file "system/build.prop":
|
||||
SYSTEM/build.prop
|
||||
|
||||
@@ -93,6 +95,8 @@ def make_filter_from_whitelists(whitelists, all_targets):
|
||||
with open(whitelist, 'rb') as f:
|
||||
for line in f:
|
||||
pat = line.strip().decode()
|
||||
if pat.startswith('#'):
|
||||
continue
|
||||
if pat and pat[-1] == '\\':
|
||||
pat = pat.rstrip('\\')
|
||||
if '=' in pat:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# Common whitelist
|
||||
system/build.prop=ro.system.build.date
|
||||
system/build.prop=ro.system.build.fingerprint
|
||||
system/build.prop=ro.system.build.version.incremental
|
||||
|
||||
Reference in New Issue
Block a user