summaryrefslogtreecommitdiff
path: root/coverage/report.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/report.py')
-rw-r--r--coverage/report.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/coverage/report.py b/coverage/report.py
index 2ffbbaa5..981657c7 100644
--- a/coverage/report.py
+++ b/coverage/report.py
@@ -97,5 +97,8 @@ class Reporter(object):
# 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