Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import cherrypy'before_finalize', priority=60)
def noisy_hook_1():
raise ValueError('hook 1 failed')'before_finalize', priority=60)
def noisy_hook_2():
raise ValueError('hook 2 failed')
class Server:
config = {
'global': {
'server.socket_host': '::0',
'/': {
'tools.noisy_hook_1.on': True,
'tools.noisy_hook_1.failsafe': True,
'tools.noisy_hook_2.on': True,
'tools.noisy_hook_2.failsafe': True,
def index(self):
return "Hello World"
def run(cls):
cherrypy.quickstart(cls(), config=cls.config)
__name__ == '__main__' and
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.