Mercurial > piecrust2
diff piecrust/workerpool.py @ 1046:aa4f1e04cf3e
serve: Don't spam the output when hitting CTRL+C while processing assets.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 23 Jan 2018 08:54:58 -0800 |
parents | bd544b65cfad |
children |
line wrap: on
line diff
--- 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)))