]> granicus.if.org Git - python/commitdiff
Changed 'object_filenames()' to raise exception instead of silently carrying
authorGreg Ward <gward@python.net>
Sat, 24 Jun 2000 02:22:49 +0000 (02:22 +0000)
committerGreg Ward <gward@python.net>
Sat, 24 Jun 2000 02:22:49 +0000 (02:22 +0000)
on if it sees a filename with unknown extension.

Lib/distutils/ccompiler.py

index 5be8c25a14e135babcedecb59ec8bf1739108985..4dd8645bc5bd3db5d4810d665f283aa867f5690b 100644 (file)
@@ -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,