From 50f2239ca3c565b28c25b51371c42b569fa05a8c Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 8 Apr 2011 22:21:18 -0400 Subject: Deal more gracefully with unexpectedly-not-python source during reporting. --- coverage/misc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'coverage/misc.py') diff --git a/coverage/misc.py b/coverage/misc.py index 6cc42c74..4f3748fe 100644 --- a/coverage/misc.py +++ b/coverage/misc.py @@ -113,7 +113,11 @@ class CoverageException(Exception): pass class NoSource(CoverageException): - """Used to indicate we couldn't find the source for a module.""" + """We couldn't find the source for a module.""" + pass + +class NotPython(CoverageException): + """A source file turned out not to be parsable Python.""" pass class ExceptionDuringRun(CoverageException): -- cgit v1.2.1