Skip to content

Commit 26bbc0a

Browse files
committed
generate_indexes.py: Don't fail for redirect pages
1 parent 7b47128 commit 26bbc0a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

generate_indexes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def main():
3939
'<img class="logo" src="_static/sympylogo.png" alt="Logo"/>',
4040
'</a></p>'
4141
]
42-
42+
redirect = ' <meta http-equiv="refresh" content="0;URL=/latest/index.html" />'
4343
contexti = 0
4444
for linei, line in enumerate(lines):
4545
# Did we match all we need to match?
@@ -55,6 +55,8 @@ def main():
5555

5656
# If we didn't find a match in the whole file, we need to stop and fix something.
5757
if contexti < len(context):
58+
if any(redirect in line for line in lines):
59+
continue
5860
print("Couldn't find where to insert Docs for other versions in {0}".format(releasedir))
5961
sys.exit(0)
6062

0 commit comments

Comments
 (0)