Skip to content
Snippets Groups Projects
Commit c92c6925 authored by Gerhard Gonter's avatar Gerhard Gonter :speech_balloon:
Browse files

ignore SIGINT

parent d8109210
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,8 @@
from guess_language import guess_language
from argparse import ArgumentParser, FileType
import sys
import signal
__authors__ = ["GG"]
__date__ = 20191031
......@@ -31,6 +33,8 @@ def guesslang(fnm):
if (lastlang != 'UNKNOWN'):
print(lastlang, ' ', page_num+1, ' ', fnm)
s = signal.signal(signal.SIGINT, signal.SIG_IGN)
argc= len(sys.argv)
# print(argc)
if argc > 1:
......@@ -41,3 +45,5 @@ else:
lang= guess_language(text)
print(lang, ' ', 'stdin')
signal.signal(signal.SIGINT, s)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment