Kaydet (Commit) 246beb25 authored tarafından Fred Drake's avatar Fred Drake

Don't use tempfile.mktemp(), since it produces annoying warnings, and

usually isn't what we want anyway.
üst e20131ef
...@@ -43,7 +43,6 @@ import re ...@@ -43,7 +43,6 @@ import re
import shutil import shutil
import string import string
import sys import sys
import tempfile
if not hasattr(os.path, "abspath"): if not hasattr(os.path, "abspath"):
...@@ -265,9 +264,11 @@ class Job: ...@@ -265,9 +264,11 @@ class Job:
self.log_filename = os.path.abspath(self.doc + ".how") self.log_filename = os.path.abspath(self.doc + ".how")
if os.path.exists(self.log_filename): if os.path.exists(self.log_filename):
os.unlink(self.log_filename) os.unlink(self.log_filename)
if os.path.exists(self.doc + ".l2h"): l2hconf = self.doc + ".l2h"
self.l2h_aux_init_file = tempfile.mktemp() if os.path.exists(l2hconf):
else: if os.path.exists(l2hconf + "~"):
os.unlink(l2hconf + "~")
os.rename(l2hconf, l2hconf + "~")
self.l2h_aux_init_file = self.doc + ".l2h" self.l2h_aux_init_file = self.doc + ".l2h"
self.write_l2h_aux_init_file() self.write_l2h_aux_init_file()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment