summaryrefslogtreecommitdiff
path: root/coverage/html.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/html.py')
-rw-r--r--coverage/html.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/coverage/html.py b/coverage/html.py
index 6d1bb43..c0dfe80 100644
--- a/coverage/html.py
+++ b/coverage/html.py
@@ -39,15 +39,22 @@ def data_filename(fname, pkgdir=""):
is provided, at that sub-directory.
"""
+ tried = []
for static_dir in STATIC_PATH:
static_filename = os.path.join(static_dir, fname)
if os.path.exists(static_filename):
return static_filename
+ else:
+ tried.append(static_filename)
if pkgdir:
static_filename = os.path.join(static_dir, pkgdir, fname)
if os.path.exists(static_filename):
return static_filename
- raise CoverageException("Couldn't find static file %r" % fname)
+ else:
+ tried.append(static_filename)
+ raise CoverageException(
+ "Couldn't find static file %r from %r, tried: %r" % (fname, os.getcwd(), tried)
+ )
def data(fname):