summaryrefslogtreecommitdiff
path: root/coverage/summary.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/summary.py')
-rw-r--r--coverage/summary.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/coverage/summary.py b/coverage/summary.py
index 95e78c3..b0fa71a 100644
--- a/coverage/summary.py
+++ b/coverage/summary.py
@@ -117,6 +117,8 @@ class SummaryReporter(Reporter):
# Sort the lines and write them out.
if getattr(self.config, 'sort', None):
position = column_order.get(self.config.sort.lower())
+ if position is None:
+ raise CoverageException("Invalid sorting option: {0!r}".format(self.config.sort))
lines.sort(key=lambda l: (l[1][position], l[0]))
for line in lines: