Fix pep2rss to include PEPs written in reStructuredText format (GH-632)

This commit is contained in:
Harmon 2018-04-27 00:20:27 -05:00 committed by Zachary Ware
parent 433faca4cf
commit 1e68a0f83b
1 changed files with 3 additions and 1 deletions

View File

@ -15,8 +15,10 @@ def firstline_startingwith(full_path, text):
return line[len(text):].strip()
return None
# get list of peps with creation time (from "Created:" string in pep .txt)
# get list of peps with creation time
# (from "Created:" string in pep .rst or .txt)
peps = glob.glob('pep-*.txt')
peps.extend(glob.glob('pep-*.rst'))
def pep_creation_dt(full_path):
created_str = firstline_startingwith(full_path, 'Created:')
# bleh, I was hoping to avoid re but some PEPs editorialize