DebugClients/Python/coverage/report.py

changeset 6219
d6c795b5ce33
parent 5178
878ce843ca9f
--- a/DebugClients/Python/coverage/report.py	Sat Apr 07 13:17:06 2018 +0200
+++ b/DebugClients/Python/coverage/report.py	Sat Apr 07 13:35:10 2018 +0200
@@ -54,12 +54,12 @@
         """
         reporters = self.coverage._get_file_reporters(morfs)
 
-        if self.config.include:
-            matcher = FnmatchMatcher(prep_patterns(self.config.include))
+        if self.config.report_include:
+            matcher = FnmatchMatcher(prep_patterns(self.config.report_include))
             reporters = [fr for fr in reporters if matcher.match(fr.filename)]
 
-        if self.config.omit:
-            matcher = FnmatchMatcher(prep_patterns(self.config.omit))
+        if self.config.report_omit:
+            matcher = FnmatchMatcher(prep_patterns(self.config.report_omit))
             reporters = [fr for fr in reporters if not matcher.match(fr.filename)]
 
         self._file_reporters = sorted(reporters)
@@ -97,5 +97,8 @@
                 # explicitly suppress those errors.
                 # NotPython is only raised by PythonFileReporter, which has a
                 # should_be_python() method.
-                if fr.should_be_python() and not self.config.ignore_errors:
-                    raise
+                if fr.should_be_python():
+                    if self.config.ignore_errors:
+                        self.coverage._warn("Could not parse Python file {0}".format(fr.filename))
+                    else:
+                        raise

eric ide

mercurial