summaryrefslogtreecommitdiff
path: root/coverage/misc.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2011-04-08 22:21:18 -0400
committerNed Batchelder <ned@nedbatchelder.com>2011-04-08 22:21:18 -0400
commit50f2239ca3c565b28c25b51371c42b569fa05a8c (patch)
treec0bd675abd1570e7f9517f6271fc666d620d00f6 /coverage/misc.py
parent4d395ed6ac593efe933909f88dab05def0edcd2e (diff)
downloadpython-coveragepy-git-50f2239ca3c565b28c25b51371c42b569fa05a8c.tar.gz
Deal more gracefully with unexpectedly-not-python source during reporting.
Diffstat (limited to 'coverage/misc.py')
-rw-r--r--coverage/misc.py6
1 files changed, 5 insertions, 1 deletions
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):