0

Catch KeyboardInterrupt so we don't barf a trace

Concerns issue #1531.

Future work can actually try to save state in this case, but especially
with multiprocessing, that might become a bit hairy.
This commit is contained in:
Nicolas F
2019-07-12 17:15:51 +02:00
parent 402d35fefc
commit 106d332136
2 changed files with 5 additions and 0 deletions

View File

@@ -659,3 +659,6 @@ See http://docs.overviewer.org/en/latest/index.html#help
This is the error that occurred:""") This is the error that occurred:""")
util.nice_exit(1) util.nice_exit(1)
except KeyboardInterrupt:
logging.info("Interrupted by user. Aborting.")
util.nice_exit(2)

View File

@@ -261,6 +261,8 @@ class MultiprocessingDispatcherProcess(multiprocessing.Process):
self.result_queue.put(result, False) self.result_queue.put(result, False)
except queue.Empty: except queue.Empty:
pass pass
except KeyboardInterrupt:
return
class MultiprocessingDispatcher(Dispatcher): class MultiprocessingDispatcher(Dispatcher):
"""A subclass of Dispatcher that spawns worker processes and """A subclass of Dispatcher that spawns worker processes and