def run(self): app = web.Application() app.router.add_get('/', self.handle_get) app.router.add_post('/', self.handle_post) try: web.run_app(app, host=self.hostname, port=self.port, handle_signals=True, print=False) except Exception: pass finally: print("Shutting down http proxy") raise GracefulExit()
def __exit(): if started: daemon.stop_event.set() else: raise GracefulExit()
def __exit(): raise GracefulExit()