~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/dispatch/__init__.py

  • Committer: William Grant
  • Date: 2009-06-29 03:42:31 UTC
  • Revision ID: grantw@unimelb.edu.au-20090629034231-ceo0aoc68gmyg2ww
Revive a removed part of the top-level crash handler.

fileservice is still raising IVLEErrors, relying on the assumption that
the HTTP status code in them will end up in the response. That job was
actually done by the top level crash handler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
    req.content_type = "text/html"
156
156
    logfile = os.path.join(config['paths']['logs'], 'ivle_error.log')
157
157
    logfail = False
158
 
    req.status = mod_python.apache.HTTP_INTERNAL_SERVER_ERROR
 
158
 
 
159
    # XXX: This remains here for ivle.interpret's IVLEErrors. Once we rewrite
 
160
    #      fileservice, req.status should always be 500 (ISE) here.
 
161
    try:
 
162
        httpcode = exc_value.httpcode
 
163
        req.status = httpcode
 
164
    except AttributeError:
 
165
        httpcode = None
 
166
        req.status = mod_python.apache.HTTP_INTERNAL_SERVER_ERROR
159
167
 
160
168
    try:
161
169
        publicmode = req.publicmode