mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-20 04:11:52 +00:00
Print interrupt note in text output.
This commit is contained in:
parent
43c2e6641b
commit
9b794b936c
2 changed files with 5 additions and 3 deletions
|
|
@ -182,7 +182,7 @@ def abort (aggregate):
|
|||
break
|
||||
except KeyboardInterrupt:
|
||||
log.warn(LOG_CHECK, _("user abort; force shutdown"))
|
||||
aggregate.end_log_output(abort=True)
|
||||
aggregate.end_log_output(interrupt=True)
|
||||
abort_now()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -221,9 +221,11 @@ class TextLogger (_Logger):
|
|||
self.write(u": " + url_data.result, color=color)
|
||||
self.writeln()
|
||||
|
||||
def write_outro (self):
|
||||
def write_outro (self, interrupt=False):
|
||||
"""Write end of checking message."""
|
||||
self.writeln()
|
||||
if interrupt:
|
||||
self.writeln(_("The check has been interrupted; results are not complete."))
|
||||
self.write(_("That's it.") + " ")
|
||||
self.write(_n("%d link", "%d links",
|
||||
self.stats.number) % self.stats.number)
|
||||
|
|
@ -289,5 +291,5 @@ class TextLogger (_Logger):
|
|||
if self.has_part('stats'):
|
||||
self.write_stats()
|
||||
if self.has_part('outro'):
|
||||
self.write_outro()
|
||||
self.write_outro(interrupt=kwargs.get("interrupt"))
|
||||
self.close_fileoutput()
|
||||
|
|
|
|||
Loading…
Reference in a new issue