From b2143bf4dcd338d839e8b9d20782c4c1362eca9b Mon Sep 17 00:00:00 2001 From: Justin Yun Date: Tue, 19 Jul 2022 14:31:44 +0900 Subject: [PATCH] Exclude list may have comment With this change the exclude list file may have comments that start with '#' Test: Run collect_ninja_inputs.py with excluded file list that has '#' comments Change-Id: Ic2e3da8a34144426e00ebd45ee09ff9cb3b339bd --- tools/ninja_dependency_analysis/collect_ninja_inputs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ninja_dependency_analysis/collect_ninja_inputs.py b/tools/ninja_dependency_analysis/collect_ninja_inputs.py index 8f626df43..e7f2234c8 100755 --- a/tools/ninja_dependency_analysis/collect_ninja_inputs.py +++ b/tools/ninja_dependency_analysis/collect_ninja_inputs.py @@ -30,7 +30,7 @@ def build_cmd(ninja_binary, ninja_file, target, exempted_file_list): if exempted_file_list and exempted_file_list.exists(): with open(exempted_file_list) as fin: for l in map(str.strip, fin.readlines()): - if l: + if l and not l.startswith('#'): cmd.extend(['-e', l]) cmd.append(target)