Mercurial > piecrust2
changeset 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 | 2f39ffa601a9 |
children | ba809c221a27 |
files | piecrust/workerpool.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
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)))