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

« back to all changes in this revision

Viewing changes to lib/common/cgirequest.py

  • Committer: dcoles
  • Date: 2008-07-14 01:08:59 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:850
Console: Moved console up into dispatch. Now any application can, in theory, 
have it's own console just by adding 'useconsole = True' to the app settings.
Note: There are some cases where this may not be a good idea - ie. The full 
console app, public applications, etc. Removed the old single instances of 
console and made apps init functions use the new scripts_init section.

Show diffs side-by-side

added added

removed removed

Lines of Context:
254
254
        httpcode: An HTTP response status code. Pass a constant from the
255
255
        Request class.
256
256
        """
257
 
        raise common.util.IVLEError(httpcode, message)
 
257
        self.status = 500
 
258
        self.headers_out['X-IVLE-Error-Code'] = httpcode
 
259
        self.headers_out['X-IVLE-Error-Message'] = message
 
260
        self.ensure_headers_written()
 
261
        self.write('An internal IVLE error has occurred.')
 
262
        self.flush()
 
263
        sys.exit(self.status)
258
264
 
259
265
    def throw_redirect(self, location):
260
266
        """Writes out an HTTP redirect to the specified URL. Exits the