summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2008-01-02 19:00:46 (GMT)
committerGuido van Rossum <guido@python.org>2008-01-02 19:00:46 (GMT)
commit27edd829d7673a642cf5b37c3011454ec33cb715 (patch)
tree57c2274589037d9ed44e3ba5156742104a51b9e8 /Lib/distutils/command
parentfed3ebc0001136bd63e951282233eda5b56acb33 (diff)
downloadcpython-27edd829d7673a642cf5b37c3011454ec33cb715.zip
cpython-27edd829d7673a642cf5b37c3011454ec33cb715.tar.gz
cpython-27edd829d7673a642cf5b37c3011454ec33cb715.tar.bz2
Patch #1696. Don't attempt to close None in dry-run mode.
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r--Lib/distutils/command/build_scripts.py3
1 files changed, 2 insertions, 1 deletions
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':