Commit 3d1deaec authored by Tres Seaver's avatar Tres Seaver

Merge fix #936: use new response object to call exception() in publish_module()

parent 8131841b
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
__doc__="""Python Object Publisher -- Publish Python objects on web servers __doc__="""Python Object Publisher -- Publish Python objects on web servers
$Id: Publish.py,v 1.143 1999/09/23 21:57:46 jim Exp $""" $Id: Publish.py,v 1.144 2000/04/05 00:51:37 tseaver Exp $"""
__version__='$Revision: 1.143 $'[11:-2] __version__='$Revision: 1.144 $'[11:-2]
import sys, os import sys, os
from string import lower, atoi, rfind, strip from string import lower, atoi, rfind, strip
...@@ -214,14 +214,14 @@ def publish_module(module_name, ...@@ -214,14 +214,14 @@ def publish_module(module_name,
response = publish(request, module_name, after_list, debug=debug) response = publish(request, module_name, after_list, debug=debug)
except SystemExit, v: except SystemExit, v:
must_die=sys.exc_info() must_die=sys.exc_info()
response.exception(must_die) request.response.exception(must_die)
except ImportError, v: except ImportError, v:
if type(v) is type(()) and len(v)==3: must_die=v if type(v) is type(()) and len(v)==3: must_die=v
elif hasattr(sys, 'exc_info'): must_die=sys.exc_info() elif hasattr(sys, 'exc_info'): must_die=sys.exc_info()
else: must_die = SystemExit, v, sys.exc_info()[2] else: must_die = SystemExit, v, sys.exc_info()[2]
response.exception(1, v) request.response.exception(1, v)
except: except:
response.exception() request.response.exception()
status=response.getStatus() status=response.getStatus()
if response: if response:
......
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