[Python-checkins] CVS: python/nondist/peps pep2html.py,1.20,1.21
Fred L. Drake
fdrake@users.sourceforge.net
Wed, 21 Mar 2001 06:52:15 -0800
Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv15068
Modified Files:
pep2html.py
Log Message:
Be more careful about generating the URL to RFCs.
Index: pep2html.py
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** pep2html.py 2001/03/21 12:37:22 1.20
--- pep2html.py 2001/03/21 14:52:13 1.21
***************
*** 71,76 ****
link = os.path.splitext(text)[0] + ".html"
elif text[:3] == 'RFC':
! link = ('http://www.rfc-editor.org/rfc/rfc%s.txt' %
! match.groupdict()['rfcnum'])
if link:
return "<a href='%s'>%s</a>" % (link, cgi.escape(text))
--- 71,76 ----
link = os.path.splitext(text)[0] + ".html"
elif text[:3] == 'RFC':
! rfcnum = int(match.group('rfcnum'), 10)
! link = 'http://www.rfc-editor.org/rfc/rfc%04d.txt' % rfcnum
if link:
return "<a href='%s'>%s</a>" % (link, cgi.escape(text))