summaryrefslogtreecommitdiff
path: root/coverage/html.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/html.py')
-rw-r--r--coverage/html.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/coverage/html.py b/coverage/html.py
index 78c982a2..cff2419d 100644
--- a/coverage/html.py
+++ b/coverage/html.py
@@ -116,8 +116,8 @@ class HtmlDataGeneration(object):
elif lineno in analysis.statements:
category = 'run'
- if self.config.show_contexts:
- contexts = sorted(filter(None, contexts_by_lineno[lineno]))
+ if category and self.config.show_contexts:
+ contexts = sorted(c or "(empty)" for c in contexts_by_lineno[lineno])
else:
contexts = None