Ignore:
Timestamp:
Dec 20, 2009, 9:45:34 PM (15 years ago)
Author:
broder
Message:

Update the errortest handler for cherrypy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-web/cherrypy-rebased/code/main.py

    r2687 r2689  
    182182        return {'request': cherrypy.request, 'kwargs': kwargs}
    183183    helloworld._cp_config['tools.require_login.on'] = False
     184
     185    @cherrypy.expose
     186    def errortest(self):
     187        """Throw an error, to test the error-tracing mechanisms."""
     188        raise RuntimeError("test of the emergency broadcast system")
    184189
    185190    class MachineView(View):
     
    653658    return handler(username, newstate, path, fields)
    654659
    655 def throwError(_, __, ___, ____):
    656     """Throw an error, to test the error-tracing mechanisms."""
    657     raise RuntimeError("test of the emergency broadcast system")
    658 
    659660mapping = dict(
    660661               modify=modify,
    661662               unauth=unauthFront,
    662663               admin=admin,
    663                overlord=admin,
    664                errortest=throwError)
     664               overlord=admin)
    665665
    666666def printHeaders(headers):
Note: See TracChangeset for help on using the changeset viewer.