diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2011-04-08 22:21:18 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2011-04-08 22:21:18 -0400 |
commit | ebfdacfc4008c91a49706ae721ce35899d0d51d0 (patch) | |
tree | f889793897a6eea578acc7d3e01c123604817202 /coverage/misc.py | |
parent | 14c0dc4f0fe2d509d6a3779a01bb50f7f861f366 (diff) | |
download | python-coveragepy-ebfdacfc4008c91a49706ae721ce35899d0d51d0.tar.gz |
Deal more gracefully with unexpectedly-not-python source during reporting.
Diffstat (limited to 'coverage/misc.py')
-rw-r--r-- | coverage/misc.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/coverage/misc.py b/coverage/misc.py index 6cc42c7..4f3748f 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): |