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

« back to all changes in this revision

Viewing changes to ivle/interpret.py

  • Committer: William Grant
  • Date: 2010-03-03 04:05:17 UTC
  • Revision ID: grantw@unimelb.edu.au-20100303040517-7grsyhj96ksqzi9e
Remove IVLEError support; only fileservice used it, and the last invocation is GONE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
import ivle
25
25
from ivle import studpath
26
 
from ivle.util import IVLEError, IVLEJailError, split_path
 
26
from ivle.util import IVLEJailError, split_path
27
27
 
28
28
import functools
29
29
 
218
218
        # Is this an internal IVLE error condition?
219
219
        hs = cgiflags.headers
220
220
        if 'X-IVLE-Error-Type' in hs:
221
 
            t = hs['X-IVLE-Error-Type']
222
 
            if t == IVLEError.__name__:
223
 
                raise IVLEError(int(hs['X-IVLE-Error-Code']),
224
 
                                hs['X-IVLE-Error-Message'])
225
 
            else:
226
 
                try:
227
 
                    raise IVLEJailError(hs['X-IVLE-Error-Type'],
228
 
                                        hs['X-IVLE-Error-Message'],
229
 
                                        hs['X-IVLE-Error-Info'])
230
 
                except KeyError:
231
 
                    raise IVLEError(500, 'bad error headers written by CGI')
 
221
            try:
 
222
                raise IVLEJailError(hs['X-IVLE-Error-Type'],
 
223
                                    hs['X-IVLE-Error-Message'],
 
224
                                    hs['X-IVLE-Error-Info'])
 
225
            except KeyError:
 
226
                raise AssertionError("Bad error headers written by CGI.")
232
227
 
233
228
        # Check to make sure the required headers were written
234
229
        if cgiflags.wrote_html_warning or not cgiflags.gentle: