From: Georg Brandl
Date: Sun, 5 Apr 2009 18:34:58 +0000 (+0000)
Subject: #602893: add indicator for current line in cgitb that doesnt rely on styling alone.
X-Git-Tag: v2.7a1~1552
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7ab5eb91b7aba558ef39d7fa4ca7d3a63d4e886e;p=python
#602893: add indicator for current line in cgitb that doesnt rely on styling alone.
---
diff --git a/Lib/cgitb.py b/Lib/cgitb.py
index 831f792e1d..35f4a50d5f 100644
--- a/Lib/cgitb.py
+++ b/Lib/cgitb.py
@@ -141,10 +141,11 @@ function calls leading up to the error, in the order they occurred.
'''
i = lnum - index
for line in lines:
num = small(' ' * (5-len(str(i))) + str(i)) + ' '
- line = '%s%s' % (num, pydoc.html.preformat(line))
if i in highlight:
+ line = '=>%s%s' % (num, pydoc.html.preformat(line))
rows.append('%s |
' % line)
else:
+ line = ' %s%s' % (num, pydoc.html.preformat(line))
rows.append('%s |
' % grey(line))
i += 1