From: Thomas Heller Date: Tue, 15 Oct 2002 14:51:58 +0000 (+0000) Subject: Revert the previous checkin - it didn't work anyway. X-Git-Tag: v2.3c1~3774 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d98d25e22d572ec53fc147f470ac866cc9b5dbd2;p=thirdparty%2FPython%2Fcpython.git Revert the previous checkin - it didn't work anyway. --- diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py index b5383198813b..71e51bfd379a 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)