diff options
author | nland <nland@dyn.com> | 2016-06-02 18:49:51 -0400 |
---|---|---|
committer | nland <nland@dyn.com> | 2016-06-02 18:49:51 -0400 |
commit | 58e85b5fd764384066d32215761b81a0c860c36a (patch) | |
tree | 59c6f0c806ab3553859f7e5c04c0f6bb29ab1b08 /coverage/python.py | |
parent | 15bf8889d0fe6ec49412d2f13ffb1f0a3e4886be (diff) | |
download | python-coveragepy-58e85b5fd764384066d32215761b81a0c860c36a.tar.gz |
issue #231 on BB: provide more verbose error message
Diffstat (limited to 'coverage/python.py')
-rw-r--r-- | coverage/python.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/coverage/python.py b/coverage/python.py index 8e98bea..601318c 100644 --- a/coverage/python.py +++ b/coverage/python.py @@ -51,7 +51,9 @@ def get_python_source(filename): break else: # Couldn't find source. - raise NoSource("No source for code: '%s'." % filename) + exc_msg = "No source for code: '%s'.\n" % (filename,) + exc_msg += "Aborting report output, consider using -i." + raise NoSource(exc_msg) # Replace \f because of http://bugs.python.org/issue19035 source = source.replace(b'\f', b' ') |