From 27edd829d7673a642cf5b37c3011454ec33cb715 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 2 Jan 2008 19:00:46 +0000 Subject: Patch #1696. Don't attempt to close None in dry-run mode. --- Lib/distutils/command/build_scripts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py index b4810c3..6af363b 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': -- cgit v0.12