diff --git a/chat_downloader/chat_downloader.py b/chat_downloader/chat_downloader.py index 0ce16d3..fe6ea2a 100644 --- a/chat_downloader/chat_downloader.py +++ b/chat_downloader/chat_downloader.py @@ -385,5 +385,10 @@ def callback(item): else: log('error', 'Keyboard Interrupt') + else: # No exceptions raised + return + finally: downloader.close() + + return 1 diff --git a/chat_downloader/cli.py b/chat_downloader/cli.py index 3fa035b..3950dd8 100644 --- a/chat_downloader/cli.py +++ b/chat_downloader/cli.py @@ -191,4 +191,4 @@ def add_init_param(group, *keys, **kwargs): set_log_level(args.logging) # Run with these arguments - run(**args.__dict__) + return run(**args.__dict__)