From 875faf4d564820f5ba5f99461990f47dc06f8416 Mon Sep 17 00:00:00 2001 From: Byron Lathi Date: Fri, 16 Aug 2024 23:12:37 -0700 Subject: [PATCH] Add comment feature --- src/rtl_manifest/rtl_manifest.py | 4 +++- test/sources.list | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rtl_manifest/rtl_manifest.py b/src/rtl_manifest/rtl_manifest.py index beb5faf..6aac7f9 100644 --- a/src/rtl_manifest/rtl_manifest.py +++ b/src/rtl_manifest/rtl_manifest.py @@ -28,6 +28,8 @@ def read_sources(source_file: str) -> List[str]: with open(source_file, "r") as file: for line in file: path = line.strip() + if path.startswith("#"): + continue if (path.endswith("sources.list")): new_path = pathlib.Path(base_dir) / path for recursive_path in read_sources(new_path): @@ -36,4 +38,4 @@ def read_sources(source_file: str) -> List[str]: abs_path = pathlib.Path(base_dir / path).absolute() files.append(str(abs_path)) - return files \ No newline at end of file + return files diff --git a/test/sources.list b/test/sources.list index 5b512af..04de8da 100644 --- a/test/sources.list +++ b/test/sources.list @@ -1,2 +1,3 @@ src/sub/submodule/sources.list src/example.sv +# This is a comment!