[Python-checkins] CVS: python/dist/src/Doc/tools mkhowto,1.24,1.24.4.1
Fred L. Drake
fdrake@users.sourceforge.net
2001年5月08日 21:04:13 -0700
Update of /cvsroot/python/python/dist/src/Doc/tools
In directory usw-pr-cvs1:/tmp/cvs-serv30614/tools
Modified Files:
Tag: release21-maint
mkhowto
Log Message:
Job.build_html(): Be more robust in ensuring about.html exists; copying
the right HTML file to the name about.html is needed even if the
--numeric option was not given -- some other name may have been
assigned due to some non-determinism in the algorithm use to perform
name allocation. ;-(
This closes the "About..." portion of SF bug #420216.
Index: mkhowto
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkhowto,v
retrieving revision 1.24
retrieving revision 1.24.4.1
diff -C2 -r1.24 -r1.24.4.1
*** mkhowto 2001年03月02日 16:26:45 1.24
--- mkhowto 2001年05月09日 04:04:11 1.24.4.1
***************
*** 370,391 ****
os.path.join(builddir, "index.html"))
if max_split_depth != 1:
! if self.options.numeric:
! label_file = os.path.join(builddir, "labels.pl")
! fp = open(label_file)
! about_node = None
! target = " = q/about/;\n"
! x = len(target)
! while 1:
line = fp.readline()
! if not line:
! break
! if line[-x:] == target:
! line = fp.readline()
! m = re.search(r"\|(node\d+\.[a-z]+)\|", line)
! about_node = m.group(1)
! shutil.copyfile(os.path.join(builddir, about_node),
! os.path.join(builddir, "about.html"))
! break
! else:
pwd = os.getcwd()
try:
--- 370,390 ----
os.path.join(builddir, "index.html"))
if max_split_depth != 1:
! label_file = os.path.join(builddir, "labels.pl")
! fp = open(label_file)
! about_node = None
! target = " = q/about/;\n"
! x = len(target)
! while 1:
! line = fp.readline()
! if not line:
! break
! if line[-x:] == target:
line = fp.readline()
! m = re.search(r"\|(node\d+\.[a-z]+)\|", line)
! about_node = m.group(1)
! shutil.copyfile(os.path.join(builddir, about_node),
! os.path.join(builddir, "about.html"))
! break
! if not self.options.numeric:
pwd = os.getcwd()
try: