comparison roundup/cgi/cgitb.py @ 1066:cf22c87d6fce

tweak
author Richard Jones <richard@users.sourceforge.net>
date Fri, 06 Sep 2002 07:23:29 +0000
parents 0f9aa62917bd
children 04b44df7af1d
comparison
equal deleted inserted replaced
1065:0f9aa62917bd 1066:cf22c87d6fce
1 # 1 #
2 # This module was written by Ka-Ping Yee, <ping@lfw.org>. 2 # This module was written by Ka-Ping Yee, <ping@lfw.org>.
3 # 3 #
4 # $Id: cgitb.py,v 1.2 2002-09-06 07:21:31 richard Exp $ 4 # $Id: cgitb.py,v 1.3 2002-09-06 07:23:29 richard Exp $
5 5
6 __doc__ = """ 6 __doc__ = """
7 Extended CGI traceback handler by Ka-Ping Yee, <ping@lfw.org>. 7 Extended CGI traceback handler by Ka-Ping Yee, <ping@lfw.org>.
8 """ 8 """
9 9
45 if len(ts) == 2: 45 if len(ts) == 2:
46 supp, context = ts 46 supp, context = ts
47 l.append('in template %r'%context.id) 47 l.append('in template %r'%context.id)
48 elif len(ts) == 3: 48 elif len(ts) == 3:
49 supp, context, info = ts 49 supp, context, info = ts
50 l.append('in expression %r\n%s\n%s\n'%(info, 50 l.append('in expression %r\n current variables:\n%s\n%s\n'%(info,
51 niceDict(' ', context.global_vars), 51 niceDict(' ', context.global_vars),
52 niceDict(' ', context.local_vars))) 52 niceDict(' ', context.local_vars)))
53 # context._scope_stack)) 53 # context._scope_stack))
54 return head + cgi.escape('\n'.join(l)) + '</pre><p>&nbsp;</p>' 54 return head + cgi.escape('\n'.join(l)) + '</pre><p>&nbsp;</p>'
55 55
161 print breaker() 161 print breaker()
162 print html() 162 print html()
163 163
164 # 164 #
165 # $Log: not supported by cvs2svn $ 165 # $Log: not supported by cvs2svn $
166 # Revision 1.2 2002/09/06 07:21:31 richard
167 # much nicer error messages when there's a templating error
168 #
166 # Revision 1.1 2002/08/30 08:28:44 richard 169 # Revision 1.1 2002/08/30 08:28:44 richard
167 # New CGI interface support 170 # New CGI interface support
168 # 171 #
169 # Revision 1.10 2002/01/16 04:49:45 richard 172 # Revision 1.10 2002/01/16 04:49:45 richard
170 # Handle a special case that the CGI interface tickles. I need to check if 173 # Handle a special case that the CGI interface tickles. I need to check if

Roundup Issue Tracker: http://roundup-tracker.org/