Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d98d25e

Browse files
author
Thomas Heller
committed
Revert the previous checkin - it didn't work anyway.
1 parent 6e5680f commit d98d25e

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Lib/distutils/command/bdist_wininst.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,17 +130,16 @@ def run (self):
130130

131131
# And make an archive relative to the root of the
132132
# pseudo-installation tree.
133-
from tempfile import NamedTemporaryFile
134-
arc = NamedTemporaryFile(".zip")
135-
archive_basename = arc.name[:-4]
133+
from tempfile import mktemp
134+
archive_basename = mktemp()
136135
fullname = self.distribution.get_fullname()
137136
arcname = self.make_archive(archive_basename, "zip",
138137
root_dir=self.bdist_dir)
139138
# create an exe containing the zip-file
140139
self.create_exe(arcname, fullname, self.bitmap)
141140
# remove the zip-file again
142141
log.debug("removing temporary file '%s'", arcname)
143-
arc.close()
142+
os.remove(arcname)
144143

145144
if not self.keep_temp:
146145
remove_tree(self.bdist_dir, dry_run=self.dry_run)

0 commit comments

Comments
 (0)