From: Greg Ward Date: Sat, 24 Jun 2000 02:22:49 +0000 (+0000) Subject: Changed 'object_filenames()' to raise exception instead of silently carrying X-Git-Tag: v2.0b1~1429 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9aa668b03a7ea6b0011c159d3ab5b5242a69d579;p=python Changed 'object_filenames()' to raise exception instead of silently carrying on if it sees a filename with unknown extension. --- diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py index 5be8c25a14..4dd8645bc5 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,