diff Lib/distutils/command/build_scripts.py @ 44430:5cd28f010fc7 legacy-trunk

Patch #1696. Don't attempt to close None in dry-run mode.
author Guido van Rossum <guido@python.org>
date Wed, 02 Jan 2008 19:00:46 +0000
parents a0d2012ff4c1
children 1d84bf5f9478
line wrap: on
line diff
--- a/Lib/distutils/command/build_scripts.py	Wed Jan 02 18:28:32 2008 +0000
+++ b/Lib/distutils/command/build_scripts.py	Wed Jan 02 19:00:46 2008 +0000
@@ -112,7 +112,8 @@
                 if f:
                     f.close()
             else:
-                f.close()
+                if f:
+                    f.close()
                 self.copy_file(script, outfile)
 
         if os.name == 'posix':