Skip to content

Commit

Permalink
[cli] Set exit status to 1 if exited with errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mikelei8291 committed Jun 28, 2023
1 parent 868b6aa commit 342e887
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions chat_downloader/chat_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,5 +385,10 @@ def callback(item):
else:
log('error', 'Keyboard Interrupt')

else: # No exceptions raised
return

finally:
downloader.close()

return 1
2 changes: 1 addition & 1 deletion chat_downloader/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

0 comments on commit 342e887

Please sign in to comment.