Browse Source

Fix bugs with comments in series files

Eloston 5 years ago
parent
commit
55c9945bad
2 changed files with 2 additions and 2 deletions
  1. 1 1
      devutils/check_patch_files.py
  2. 1 1
      utils/_common.py

+ 1 - 1
devutils/check_patch_files.py

@@ -39,7 +39,7 @@ def _read_series_file(patches_dir, series_file, join_dir=False):
 
     join_dir indicates if the patches_dir should be joined with the series entries
     """
-    for entry in parse_series(series_file):
+    for entry in parse_series(patches_dir / series_file):
         if join_dir:
             yield patches_dir / entry
         else:

+ 1 - 1
utils/_common.py

@@ -84,7 +84,7 @@ def parse_series(series_path):
     # Filter blank lines
     series_lines = filter(len, series_lines)
     # Filter comment lines
-    series_lines = filter((lambda x: x.startswith('#')), series_lines)
+    series_lines = filter((lambda x: not x.startswith('#')), series_lines)
     # Strip in-line comments
     series_lines = map((lambda x: x.strip().split(' #')[0]), series_lines)
     return series_lines