[Python-checkins] python/dist/src/Lib cgitb.py,1.13,1.14
akuchling at users.sourceforge.net
akuchling at users.sourceforge.net
Sat Jul 10 16:14:54 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30082
Modified Files:
cgitb.py
Log Message:
[Patch #987052 from Thomas Guettler]
Don't output empty tags
Escape page header
Remove <p> before <table> (tidy complains)
Index: cgitb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/cgitb.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** cgitb.py 7 Jun 2004 11:20:40 -0000 1.13
--- cgitb.py 10 Jul 2004 14:14:51 -0000 1.14
***************
*** 38,44 ****
__UNDEF__ = [] # a special sentinel object
! def small(text): return '<small>' + text + '</small>'
! def strong(text): return '<strong>' + text + '</strong>'
! def grey(text): return '<font color="#909090">' + text + '</font>'
def lookup(name, frame, locals):
--- 38,58 ----
__UNDEF__ = [] # a special sentinel object
! def small(text):
! if text:
! return '<small>' + text + '</small>'
! else:
! return ''
!
! def strong(text):
! if text:
! return '<strong>' + text + '</strong>'
! else:
! return ''
!
! def grey(text):
! if text:
! return '<font color="#909090">' + text + '</font>'
! else:
! return ''
def lookup(name, frame, locals):
***************
*** 89,96 ****
date = time.ctime(time.time())
head = '<body bgcolor="#f0f0f8">' + pydoc.html.heading(
! '<big><big><strong>%s</strong></big></big>' % str(etype),
'#ffffff', '#6622aa', pyver + '<br>' + date) + '''
<p>A problem occurred in a Python script. Here is the sequence of
! function calls leading up to the error, in the order they occurred.'''
indent = '<tt>' + small(' ' * 5) + ' </tt>'
--- 103,111 ----
date = time.ctime(time.time())
head = '<body bgcolor="#f0f0f8">' + pydoc.html.heading(
! '<big><big>%s</big></big>' %
! strong(pydoc.html.escape(str(etype))),
'#ffffff', '#6622aa', pyver + '<br>' + date) + '''
<p>A problem occurred in a Python script. Here is the sequence of
! function calls leading up to the error, in the order they occurred.</p>'''
indent = '<tt>' + small(' ' * 5) + ' </tt>'
***************
*** 143,147 ****
rows.append('<tr><td>%s</td></tr>' % small(grey(', '.join(dump))))
! frames.append('''<p>
<table width="100%%" cellspacing=0 cellpadding=0 border=0>
%s</table>''' % '\n'.join(rows))
--- 158,162 ----
rows.append('<tr><td>%s</td></tr>' % small(grey(', '.join(dump))))
! frames.append('''
<table width="100%%" cellspacing=0 cellpadding=0 border=0>
%s</table>''' % '\n'.join(rows))
More information about the Python-checkins
mailing list