diff options
author | Fred Drake <fdrake@acm.org> | 2002-08-27 16:34:54 +0000 |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2002-08-27 16:34:54 +0000 |
commit | 05d01cbc367e3f65c280f0f49138f1ddd03570c1 (patch) | |
tree | 3186103508a32fc1f5d613ac0a3601ec9aab235a /Doc | |
parent | 9fe297d59740301f58f00acc652b83b7b9e579a7 (diff) | |
download | cpython-05d01cbc367e3f65c280f0f49138f1ddd03570c1.tar.gz |
Don't use tempfile.mktemp(), since it produces annoying warnings, and
usually isn't what we want anyway.
Diffstat (limited to 'Doc')
-rwxr-xr-x | Doc/tools/mkhowto | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/tools/mkhowto b/Doc/tools/mkhowto index af46fffbbc..322b6ba6b1 100755 --- a/Doc/tools/mkhowto +++ b/Doc/tools/mkhowto @@ -43,7 +43,6 @@ import re import shutil import string import sys -import tempfile if not hasattr(os.path, "abspath"): @@ -265,10 +264,12 @@ class Job: self.log_filename = os.path.abspath(self.doc + ".how") if os.path.exists(self.log_filename): os.unlink(self.log_filename) - if os.path.exists(self.doc + ".l2h"): - self.l2h_aux_init_file = tempfile.mktemp() - else: - self.l2h_aux_init_file = self.doc + ".l2h" + l2hconf = self.doc + ".l2h" + if os.path.exists(l2hconf): + if os.path.exists(l2hconf + "~"): + os.unlink(l2hconf + "~") + os.rename(l2hconf, l2hconf + "~") + self.l2h_aux_init_file = self.doc + ".l2h" self.write_l2h_aux_init_file() def build(self): |