comparison cgi-bin/roundup.cgi @ 965:b2c537f51fc5

Fix to be able to report errors even if the cgi module can't be imported(!)
author Richard Jones <richard@users.sourceforge.net>
date Thu, 22 Aug 2002 00:14:18 +0000
parents 18d4051bdae7
children dec4711e40b3
comparison
equal deleted inserted replaced
964:832d1209aaa2 965:b2c537f51fc5
14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
18 # 18 #
19 # $Id: roundup.cgi,v 1.24 2002-01-05 02:21:22 richard Exp $ 19 # $Id: roundup.cgi,v 1.25 2002-08-22 00:14:18 richard Exp $
20 20
21 # python version check 21 # python version check
22 from roundup import version_check 22 from roundup import version_check
23 from roundup.i18n import _ 23 from roundup.i18n import _
24 import sys 24 import sys
67 # 67 #
68 try: 68 try:
69 import traceback, StringIO, cgi 69 import traceback, StringIO, cgi
70 from roundup import cgitb 70 from roundup import cgitb
71 except: 71 except:
72 print "Content-Type: text/html\n" 72 print "Content-Type: text/plain\n"
73 print _("Failed to import cgitb.<pre>") 73 print _("Failed to import cgitb!\n\n")
74 s = StringIO.StringIO() 74 s = StringIO.StringIO()
75 traceback.print_exc(None, s) 75 traceback.print_exc(None, s)
76 print cgi.escape(s.getvalue()), "</pre>" 76 print s.getvalue()
77 77
78 78
79 # 79 #
80 # Check environment for config items 80 # Check environment for config items
81 # 81 #
196 sys.stdout, sys.stderr = out, err 196 sys.stdout, sys.stderr = out, err
197 LOG.close() 197 LOG.close()
198 198
199 # 199 #
200 # $Log: not supported by cvs2svn $ 200 # $Log: not supported by cvs2svn $
201 # Revision 1.24 2002/01/05 02:21:22 richard
202 # fixes
203 #
201 # Revision 1.23 2002/01/05 02:19:03 richard 204 # Revision 1.23 2002/01/05 02:19:03 richard
202 # i18n'ification 205 # i18n'ification
203 # 206 #
204 # Revision 1.22 2001/12/13 00:20:01 richard 207 # Revision 1.22 2001/12/13 00:20:01 richard
205 # . Centralised the python version check code, bumped version to 2.1.1 (really 208 # . Centralised the python version check code, bumped version to 2.1.1 (really

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