Issue #19110: Surpress Last-Modified link in PEP 0 html

This commit is contained in:
Ned Deily 2013-09-28 12:10:28 -07:00
parent 6f337d4c07
commit ca2574f9d8
1 changed files with 7 additions and 4 deletions

View File

@ -228,11 +228,14 @@ def fixfile(inpath, input_lines, outfile):
elif k.lower() in ('last-modified',): elif k.lower() in ('last-modified',):
date = v or time.strftime('%d-%b-%Y', date = v or time.strftime('%d-%b-%Y',
time.localtime(os.stat(inpath)[8])) time.localtime(os.stat(inpath)[8]))
try: if basename == 'pep-0000.txt':
url = PEPCVSURL % int(pep)
v = '<a href="%s">%s</a> ' % (url, cgi.escape(date))
except ValueError, error:
v = date v = date
else:
try:
url = PEPCVSURL % int(pep)
v = '<a href="%s">%s</a> ' % (url, cgi.escape(date))
except ValueError, error:
v = date
elif k.lower() in ('content-type',): elif k.lower() in ('content-type',):
url = PEPURL % 9 url = PEPURL % 9
pep_type = v or 'text/plain' pep_type = v or 'text/plain'