Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys.exit(1) on abnormal termination #2166

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tari3x
Copy link

@tari3x tari3x commented Jan 14, 2024

Exit with 1 if there was an error or the user aborted the run.

Motivation: after the download finishes, my bash script separates the videos, images, and metadata into separate folders. However, I only want to do that when the download finished completely, not when it was aborted.

@aandergr
Copy link
Member

aandergr commented Mar 4, 2024

Good idea to use the exit code to inform the user that an irregular termination has occurred, we should have done that from the beginning. Thank you for tackling this! However, the way the change is proposed here, it skips the cleanup i.e. the saving of the session file. This should also happen in the event of an irregular termination.

@tari3x
Copy link
Author

tari3x commented Mar 22, 2024

Thanks! This is my first ever pull request, so I'm not super familiar with the workflow. I think it should be a lot easier for you to make sure this is idiomatic as you like it, compared to trying to explain it to me. But I'm not sure you can edit the pull request - maybe I need to give you write access on my fork for that?

@ekalin
Copy link
Collaborator

ekalin commented Mar 22, 2024

I believe that not only a failure should be indicated, but different status codes could be used for different failures. I've opened an issue to discuss this: #2220.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants