def terminate_server(sig, frame): from maildump import stop if sig == signal.SIGINT and os.isatty(sys.stdout.fileno()): # Terminate the line containing ^C print() stop()
def terminate(): if app.config['MAILDUMP_NO_QUIT']: abort(403) log.info('Terminate request received') maildump.stop()