From: Guido van Rossum Date: Wed, 2 Jan 2008 19:00:46 +0000 (+0000) Subject: Patch #1696. Don't attempt to close None in dry-run mode. X-Git-Tag: v2.6a1~781 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=27edd829d7673a642cf5b37c3011454ec33cb715;p=thirdparty%2FPython%2Fcpython.git Patch #1696. Don't attempt to close None in dry-run mode. --- diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py index b4810c3eac2a..6af363b36dd4 100644 --- a/Lib/distutils/command/build_scripts.py +++ b/Lib/distutils/command/build_scripts.py @@ -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':