summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2002-10-15 14:51:58 (GMT)
committerThomas Heller <theller@ctypes.org>2002-10-15 14:51:58 (GMT)
commitd98d25e22d572ec53fc147f470ac866cc9b5dbd2 (patch)
treeb56324e139964702edf082225fad0ba27ee0f22b
parent6e5680fc83f3cb66af9c0f3b29ac84d2765293e1 (diff)
downloadcpython-d98d25e22d572ec53fc147f470ac866cc9b5dbd2.zip
cpython-d98d25e22d572ec53fc147f470ac866cc9b5dbd2.tar.gz
cpython-d98d25e22d572ec53fc147f470ac866cc9b5dbd2.tar.bz2
Revert the previous checkin - it didn't work anyway.
-rw-r--r--Lib/distutils/command/bdist_wininst.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py
index b538319..71e51bf 100644
--- a/Lib/distutils/command/bdist_wininst.py
+++ b/Lib/distutils/command/bdist_wininst.py
@@ -130,9 +130,8 @@ class bdist_wininst (Command):
# And make an archive relative to the root of the
# pseudo-installation tree.
- from tempfile import NamedTemporaryFile
- arc = NamedTemporaryFile(".zip")
- archive_basename = arc.name[:-4]
+ from tempfile import mktemp
+ archive_basename = mktemp()
fullname = self.distribution.get_fullname()
arcname = self.make_archive(archive_basename, "zip",
root_dir=self.bdist_dir)
@@ -140,7 +139,7 @@ class bdist_wininst (Command):
self.create_exe(arcname, fullname, self.bitmap)
# remove the zip-file again
log.debug("removing temporary file '%s'", arcname)
- arc.close()
+ os.remove(arcname)
if not self.keep_temp:
remove_tree(self.bdist_dir, dry_run=self.dry_run)