Move signal handling to a less exotic location

This commit is contained in:
Kristóf Tóth 2018-04-28 23:21:46 +02:00
parent 20225770cb
commit 649b55f84f

3
cli.py
View File

@ -15,8 +15,6 @@ class Cli:
self.best_image = None self.best_image = None
def __call__(self): def __call__(self):
signal(SIGINT, lambda a, b: exit('\nExiting!'))
self.parse_arguments() self.parse_arguments()
if not hasattr(imgrate, self.args.method): if not hasattr(imgrate, self.args.method):
@ -69,4 +67,5 @@ class Cli:
if __name__ == '__main__': if __name__ == '__main__':
signal(SIGINT, lambda a, b: exit('\nExiting!'))
Cli()() Cli()()