[Python-checkins] r59669 - python/trunk/Lib/distutils/command/build_scripts.py

guido.van.rossum python-checkins at python.org
Wed Jan 2 20:00:48 CET 2008


Author: guido.van.rossum
Date: Wed Jan  2 20:00:46 2008
New Revision: 59669

Modified:
   python/trunk/Lib/distutils/command/build_scripts.py
Log:
Patch #1696.  Don't attempt to close None in dry-run mode.


Modified: python/trunk/Lib/distutils/command/build_scripts.py
==============================================================================
--- python/trunk/Lib/distutils/command/build_scripts.py	(original)
+++ python/trunk/Lib/distutils/command/build_scripts.py	Wed Jan  2 20:00:46 2008
@@ -112,7 +112,8 @@
                 if f:
                     f.close()
             else:
-                f.close()
+                if f:
+                    f.close()
                 self.copy_file(script, outfile)
 
         if os.name == 'posix':


More information about the Python-checkins mailing list