]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Harry Henry Gebel:
authorGreg Ward <gward@python.net>
Wed, 26 Apr 2000 01:12:40 +0000 (01:12 +0000)
committerGreg Ward <gward@python.net>
Wed, 26 Apr 2000 01:12:40 +0000 (01:12 +0000)
Fix 'sdist.write_manifest()' to respect the value of dry_run.

Lib/distutils/command/sdist.py

index 8d9a4650bdef475d79822e8176b5d0f40bf46254..67917188deb9081af8181ad6da79e2e0572c578d 100644 (file)
@@ -11,7 +11,8 @@ import fnmatch
 from types import *
 from glob import glob
 from distutils.core import Command
-from distutils.util import newer, create_tree, remove_tree, native_path
+from distutils.util import newer, create_tree, remove_tree, native_path, \
+     write_file
 from distutils.archive_util import check_archive_formats
 from distutils.text_file import TextFile
 from distutils.errors import DistutilsExecError, DistutilsOptionError
@@ -447,10 +448,9 @@ class sdist (Command):
            by 'find_defaults()' and 'read_template()') to the manifest file
            named by 'self.manifest'."""
 
-        manifest = open (self.manifest, "w")
-        for fn in self.files:
-            manifest.write (fn + '\n')
-        manifest.close ()
+        self.execute(write_file,
+                     (self.manifest, self.files),
+                     "writing manifest file")
 
     # write_manifest ()