Commit 33bb12c6 authored by Jim Fulton's avatar Jim Fulton

changes to deal with Python 1.5 exceptions

parent eb6ad17b
'''CGI Response Output formatter
$Id: Response.py,v 1.42 1998/11/20 18:16:36 jim Exp $'''
$Id: Response.py,v 1.43 1998/12/02 16:58:54 jim Exp $'''
#
# Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA.
# All rights reserved.
......@@ -51,7 +51,7 @@ $Id: Response.py,v 1.42 1998/11/20 18:16:36 jim Exp $'''
#
# (540) 371-6909
#
__version__='$Revision: 1.42 $'[11:-2]
__version__='$Revision: 1.43 $'[11:-2]
import string, types, sys, regex
from string import find, rfind, lower, upper, strip, split, join, translate
......@@ -488,7 +488,7 @@ class Response:
b=v
if fatal:
if t is SystemExit and v==0:
if t is SystemExit and v.code==0:
tb=self.setBody(
(str(t),
'This application has exited normally.<p>'
......
......@@ -110,7 +110,7 @@ class PCGIPublisher:
try:
f = open(self.errorLogFile, 'a+')
f.write("%s %s\n" % (timeStamp, errmsg))
if sys.exc_type != 'SystemExit':
if sys.exc_type != SystemExit:
trace=StringIO.StringIO()
traceback.print_exception(sys.exc_type,
sys.exc_value,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment