From: Fred Drake <fdrake@acm.org>
Date: Fri, 17 Jan 2003 21:25:04 +0000 (+0000)
Subject: Clean up some files that LaTeX2HTML drops in the HTML output directory
X-Git-Tag: v2.3c1~2420
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=376f0ef30c74bf0834f313ee8add8993993cb4a8;p=python

Clean up some files that LaTeX2HTML drops in the HTML output directory
sometimes.
---

diff --git a/Doc/tools/mkhowto b/Doc/tools/mkhowto
index 4ce126b0c6..7163974a2b 100755
--- a/Doc/tools/mkhowto
+++ b/Doc/tools/mkhowto
@@ -443,6 +443,11 @@ class Job:
                     self.run("%s %s *.html" % (PERL_BINARY, NODE2LABEL_SCRIPT))
                 finally:
                     os.chdir(pwd)
+        # These files need to be cleaned up here since builddir there
+        # can be more than one, so we clean each of them.
+        if self.options.discard_temps:
+            for fn in ("images.tex", "images.log", "images.aux"):
+                safe_unlink(os.path.join(builddir, fn))
 
     def build_text(self, tempdir=None):
         if tempdir is None: