Skip to content

Commit

Permalink
Simplify create_index_file
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed May 7, 2021
1 parent 5f06b74 commit 1439cad
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,11 @@ def create_parser():
return parser.parse_args()


def create_index_file(html_content: Path):
pep_zero_html = html_content / "pep-0000.html"
pep_zero_dir = html_content / "pep-0000" / "index.html"

if pep_zero_html.is_file():
shutil.copy(pep_zero_html, html_content / "index.html")
elif pep_zero_dir.is_file():
shutil.copy(pep_zero_dir, html_content / "index.html")
def create_index_file(html_root: Path):
"""Copies PEP 0 to the root index.html so that /peps/ works."""
pep_zero_path = html_root / "pep-0000" / "index.html"
if pep_zero_path.is_file():
shutil.copy(pep_zero_path, html_root / "index.html")


if __name__ == "__main__":
Expand Down

0 comments on commit 1439cad

Please sign in to comment.