diff options
author | Nick Mathewson <nickm@torproject.org> | 2023-10-18 11:55:05 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2023-10-18 11:55:05 -0400 |
commit | b720ce4208fcace13819dc32b665449416f5eae4 (patch) | |
tree | 01a1db73319226a3f76b2aa6d6c9eef71a52b5b2 /bin | |
parent | f3a4e07d42f346ffae3340b020850d3712ad9926 (diff) | |
download | torspec-b720ce4208fcace13819dc32b665449416f5eae4.tar.gz torspec-b720ce4208fcace13819dc32b665449416f5eae4.zip |
Do not add a redirect file when an index file already exists.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/make_redirects.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/make_redirects.py b/bin/make_redirects.py index 3e677ee..99a5ea3 100755 --- a/bin/make_redirects.py +++ b/bin/make_redirects.py @@ -23,7 +23,8 @@ def book_redirects(rs, spec_dir): lines = [] for kwd, info in rs.items(): if os.path.isdir(os.path.join(spec_dir, kwd)): - source = kwd + "/index.html" + assert os.path.isfile(os.path.join(spec_dir, kwd, "index.md")) + continue elif any((os.path.isfile(os.path.join(spec_dir, kwd) + ext)) for ext in [".txt", ".md"]): continue else: |