]> granicus.if.org Git - python/commitdiff
Patch #1696. Don't attempt to close None in dry-run mode.
authorGuido van Rossum <guido@python.org>
Wed, 2 Jan 2008 19:00:46 +0000 (19:00 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 2 Jan 2008 19:00:46 +0000 (19:00 +0000)
Lib/distutils/command/build_scripts.py

index b4810c3eac2ae43964fb7fcf35ffdda02ad7a440..6af363b36dd460f3fc02204c4546ea7dd54cd733 100644 (file)
@@ -112,7 +112,8 @@ class build_scripts (Command):
                 if f:
                     f.close()
             else:
-                f.close()
+                if f:
+                    f.close()
                 self.copy_file(script, outfile)
 
         if os.name == 'posix':