summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-06-24 02:22:49 (GMT)
committerGreg Ward <gward@python.net>2000-06-24 02:22:49 (GMT)
commit9aa668b03a7ea6b0011c159d3ab5b5242a69d579 (patch)
tree3625d4edbb85ff12e8d2225564ec91d17575f2f1
parent370248d70578ad8363d4a9dc238f864d43d49442 (diff)
downloadcpython-9aa668b03a7ea6b0011c159d3ab5b5242a69d579.zip
cpython-9aa668b03a7ea6b0011c159d3ab5b5242a69d579.tar.gz
cpython-9aa668b03a7ea6b0011c159d3ab5b5242a69d579.tar.bz2
Changed 'object_filenames()' to raise exception instead of silently carrying
on if it sees a filename with unknown extension.
-rw-r--r--Lib/distutils/ccompiler.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py
index 5be8c25..4dd8645 100644
--- a/Lib/distutils/ccompiler.py
+++ b/Lib/distutils/ccompiler.py
@@ -671,7 +671,9 @@ class CCompiler:
for src_name in source_filenames:
(base, ext) = os.path.splitext (src_name)
if ext not in self.src_extensions:
- continue
+ raise UnknownFileError, \
+ "unknown file type '%s' (from '%s')" % \
+ (ext, src_name)
if strip_dir:
base = os.path.basename (base)
obj_names.append (os.path.join (output_dir,