summaryrefslogtreecommitdiff
path: root/Lib/cgitb.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-04-05 18:34:58 +0000
committerGeorg Brandl <georg@python.org>2009-04-05 18:34:58 +0000
commit7ab5eb91b7aba558ef39d7fa4ca7d3a63d4e886e (patch)
tree75ede33fa1c2f07e1c6799914f4fb436793b8949 /Lib/cgitb.py
parent453d953f3e15970ea2b69c96fd490cdbf66948a3 (diff)
downloadcpython-git-7ab5eb91b7aba558ef39d7fa4ca7d3a63d4e886e.tar.gz
#602893: add indicator for current line in cgitb that doesnt rely on styling alone.
Diffstat (limited to 'Lib/cgitb.py')
-rw-r--r--Lib/cgitb.py3
1 files changed, 2 insertions, 1 deletions
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.</p>'''
i = lnum - index
for line in lines:
num = small('&nbsp;' * (5-len(str(i))) + str(i)) + '&nbsp;'
- line = '<tt>%s%s</tt>' % (num, pydoc.html.preformat(line))
if i in highlight:
+ line = '<tt>=&gt;%s%s</tt>' % (num, pydoc.html.preformat(line))
rows.append('<tr><td bgcolor="#ffccee">%s</td></tr>' % line)
else:
+ line = '<tt>&nbsp;&nbsp;%s%s</tt>' % (num, pydoc.html.preformat(line))
rows.append('<tr><td>%s</td></tr>' % grey(line))
i += 1