-
Notifications
You must be signed in to change notification settings - Fork 13
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
ValueError when not giving multiple-match DiscID an integer #26
Comments
Yes, every entry that is no integer gives this exception and wrong numbers give a KeyError Exception. I could catch these, print a simple "not a valid choice" and exit. Or should I ask again until the user provides anything that works? |
Perhaps you could say "Could not interpret input. Do you want to try again? [Y/n]" - if "n", exit, if "Y" present the "menu" again? I pressed enter to deliberately exit the script (as I wanted to look it up on the site before picking the release to continue with). |
Yes, I also use this exception to quit, rather than pressing CTRL+C.. Not really sure if another layer of "trying again" is worth it. You can just restart the script and you are in the same "menu" again in 1-2 seconds. It's not like you lose any previous (tidious) input. |
I'm fine with anything, I just like my programs to not show me a backtrace when I quit them. :) |
I would have liked it to quit in that circumstance, like |
|
If you look up a DiscID which matches multiple releases and press enter (or presumably any non-numeric character), you will get this nice little exception:
The text was updated successfully, but these errors were encountered: