diff --git a/overviewer.py b/overviewer.py index f549542..72a3424 100755 --- a/overviewer.py +++ b/overviewer.py @@ -659,3 +659,6 @@ See http://docs.overviewer.org/en/latest/index.html#help This is the error that occurred:""") util.nice_exit(1) + except KeyboardInterrupt: + logging.info("Interrupted by user. Aborting.") + util.nice_exit(2) diff --git a/overviewer_core/dispatcher.py b/overviewer_core/dispatcher.py index a5c3846..15293f9 100644 --- a/overviewer_core/dispatcher.py +++ b/overviewer_core/dispatcher.py @@ -261,6 +261,8 @@ class MultiprocessingDispatcherProcess(multiprocessing.Process): self.result_queue.put(result, False) except queue.Empty: pass + except KeyboardInterrupt: + return class MultiprocessingDispatcher(Dispatcher): """A subclass of Dispatcher that spawns worker processes and