From 649b55f84f705c9900fa1ac1e4e1dcd9b2ddadee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Sat, 28 Apr 2018 23:21:46 +0200 Subject: [PATCH] Move signal handling to a less exotic location --- cli.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cli.py b/cli.py index 8f30e3a..be78e0b 100755 --- a/cli.py +++ b/cli.py @@ -15,8 +15,6 @@ class Cli: self.best_image = None def __call__(self): - signal(SIGINT, lambda a, b: exit('\nExiting!')) - self.parse_arguments() if not hasattr(imgrate, self.args.method): @@ -69,4 +67,5 @@ class Cli: if __name__ == '__main__': + signal(SIGINT, lambda a, b: exit('\nExiting!')) Cli()()