From 20dcc5e3ce4e5cf2effaab0439c740ffc183c317 Mon Sep 17 00:00:00 2001 From: Olof Johansson Date: Mon, 17 Mar 2014 17:47:15 +0100 Subject: [PATCH] Catch KeyboardInterrupt to avoid traceback Fixes #75 --- lib/svtplay_dl/__main__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/svtplay_dl/__main__.py b/lib/svtplay_dl/__main__.py index 13fad32..6b97114 100644 --- a/lib/svtplay_dl/__main__.py +++ b/lib/svtplay_dl/__main__.py @@ -6,7 +6,10 @@ if __package__ is None and not hasattr(sys, "frozen"): import os.path sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -import svtplay_dl +try: + import svtplay_dl -if __name__ == '__main__': - svtplay_dl.main() + if __name__ == '__main__': + svtplay_dl.main() +except KeyboardInterrupt: + pass