From 959b701ec1f7297cf55f2a68bac0ab23440e052e Mon Sep 17 00:00:00 2001 From: Tomas Musil Date: Sat, 22 Sep 2012 17:03:46 +0200 Subject: [PATCH] catching keyboard interrupt --- imago.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/imago.py b/imago.py index 87eaecf..552a359 100755 --- a/imago.py +++ b/imago.py @@ -222,4 +222,8 @@ def intersections_from_angl_dist(lines, size): return intersections if __name__ == '__main__': - sys.exit(main()) + try: + sys.exit(main()) + except KeyboardInterrupt: + print "Interrupted." + sys.exit() -- 2.4.2