diff --git a/TODO b/TODO index 4cfd11be..946a1617 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,3 @@ -- [FEATURE] Hit Ctrl-C once displays active URLs and waits for a timeout. - Hitting it *again* after that should shut down immediately, not caring - about cleanup. Here is a starting point recipe: - http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496735 - - [BUG REPORT] the web interface only runs on the server it is installed on. The ALLOWED_HOSTS and ALLOWED_SERVERS variables in lc.cgi don't work and are not (well) documented. diff --git a/linkcheck/director/__init__.py b/linkcheck/director/__init__.py index d48e01be..207a6bce 100644 --- a/linkcheck/director/__init__.py +++ b/linkcheck/director/__init__.py @@ -74,6 +74,8 @@ def interrupt (aggregate): try: linkcheck.log.warn(linkcheck.LOG_CHECK, _("keyboard interrupt; waiting for active threads to finish")) + linkcheck.log.warn(linkcheck.LOG_CHECK, + _("another keyboard interrupt will exit immediately")) print_active_threads(aggregate) abort(aggregate) break @@ -100,8 +102,10 @@ def abort (aggregate): aggregate.logger.end_log_output() break except KeyboardInterrupt: - linkcheck.log.warn(linkcheck.LOG_CHECK, _("shutdown in progress")) + linkcheck.log.warn(linkcheck.LOG_CHECK, _("keyboard interrupt; force shutdown")) print_active_threads(aggregate) + import sys + sys.exit(1) def get_aggregate (config):