diff --git a/lib/svtplay_dl/__init__.py b/lib/svtplay_dl/__init__.py index 21f6b2a..b4e2e99 100644 --- a/lib/svtplay_dl/__init__.py +++ b/lib/svtplay_dl/__init__.py @@ -195,4 +195,8 @@ def main(): sys.exit(4) url = args[0] - get_media(url, options) + + try: + get_media(url, options) + except KeyboardInterrupt: + pass diff --git a/lib/svtplay_dl/__main__.py b/lib/svtplay_dl/__main__.py index 8bb66ea..78013d8 100644 --- a/lib/svtplay_dl/__main__.py +++ b/lib/svtplay_dl/__main__.py @@ -8,10 +8,7 @@ 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__)))) -try: import svtplay_dl if __name__ == '__main__': - svtplay_dl.main() -except KeyboardInterrupt: - pass + svtplay_dl.main() \ No newline at end of file