Skip to content

Commit c8a4ed4

Browse files
committed
Add diagnostic output to parse_html_for_errors_v2.py
Print count of index.html files found (or fail fast with clear error if the HTML root directory doesn't exist) so we can confirm the walk is finding the right path in CI.
1 parent 089ce3e commit c8a4ed4

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

parse_html_for_errors_v2.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,19 @@ def main():
3636
total_removed = 0
3737
files_touched = 0
3838

39+
if not os.path.isdir(HTML_ROOT):
40+
print(
41+
f"ERROR: HTML output directory not found: {HTML_ROOT!r} (cwd={os.getcwd()!r})"
42+
)
43+
sys.exit(1)
44+
45+
all_index_files = []
46+
for dirpath, _dirnames, filenames in os.walk(HTML_ROOT):
47+
for fname in filenames:
48+
if fname == "index.html":
49+
all_index_files.append(os.path.join(dirpath, fname))
50+
print(f"Found {len(all_index_files)} index.html files under {HTML_ROOT}")
51+
3952
for dirpath, _dirnames, filenames in os.walk(HTML_ROOT):
4053
for fname in filenames:
4154
if fname != "index.html":

0 commit comments

Comments
 (0)