Source

CherryPy / cherrypy / test / test_states_demo.py

Diff from to

File cherrypy/test/test_states_demo.py

     # and then immediately call getPage without getting 503.
     cherrypy.config.update(conf)
     cherrypy.tree.mount(Root(), config={'global': conf})
-    cherrypy.engine.start()
+    try:
+        cherrypy.engine.start()
+    except ZeroDivisionError:
+        sys.exit(1)
     cherrypy.engine.block()