diff options
Diffstat (limited to 'coverage/html.py')
-rw-r--r-- | coverage/html.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coverage/html.py b/coverage/html.py index 208554c8..b095343e 100644 --- a/coverage/html.py +++ b/coverage/html.py @@ -123,7 +123,7 @@ class HtmlDataGeneration: contexts = contexts_label = None context_list = None if category and self.config.show_contexts: - contexts = sorted(c or self.EMPTY for c in contexts_by_lineno[lineno]) + contexts = sorted(c or self.EMPTY for c in contexts_by_lineno.get(lineno, ())) if contexts == [self.EMPTY]: contexts_label = self.EMPTY else: |