From 7ab5eb91b7aba558ef39d7fa4ca7d3a63d4e886e Mon Sep 17 00:00:00 2001
From: Georg Brandl
Date: Sun, 5 Apr 2009 18:34:58 +0000
Subject: [PATCH] #602893: add indicator for current line in cgitb that doesnt
rely on styling alone.
---
Lib/cgitb.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Lib/cgitb.py b/Lib/cgitb.py
index 831f792e1d0..35f4a50d5f5 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