# HG changeset patch # User Ludovic Chabant # Date 1516726498 28800 # Node ID aa4f1e04cf3e0225998556a286dc974a24a0d51f # Parent 2f39ffa601a94bd90364672f1aafd3d0bd4c33db serve: Don't spam the output when hitting CTRL+C while processing assets. diff -r 2f39ffa601a9 -r aa4f1e04cf3e piecrust/workerpool.py --- a/piecrust/workerpool.py Tue Jan 23 08:54:27 2018 -0800 +++ b/piecrust/workerpool.py Tue Jan 23 08:54:58 2018 -0800 @@ -79,6 +79,9 @@ def _real_worker_func(params): try: _real_worker_func_unsafe(params) + except (KeyboardInterrupt, SystemExit): + # Return silently + pass except Exception as ex: logger.exception(ex) msg = ("CRITICAL ERROR IN WORKER %d\n%s" % (params.wid, str(ex)))