-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: fix python26 invalid exception #4000
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
Conversation
found this using my exception finding tool :) there's now a |
👍 |
i'm going to convert many of these to IOError |
That makes sense...it's slightly hard to test for these because of the intricacies with network errors. I somewhat wish we could run these functions on pre-existing data (i.e., download them once and not need network connection for all tests), maybe have one test (potentially) that checks for elegant network handling and then that would be it. (maybe mock out the urllib library?) |
probably also good to get rid of idioms like this try:
gnarly_function
except ValueError:
raise any reason to keep those? will just bubble up anyway...unless i'm missing something about exception semantics |
yes, that's silly...unless there's a second except statement later, then try:
except ValueError: On Sat, Jun 22, 2013 at 9:19 PM, Phillip Cloud [email protected]:
|
yep that would be why it's hard to spot those in my exception-finding script in a general way otherwise i would do it...i suppose you could say "if reraise is in an exception block and there are no other blocks then mark as invalid". i will see how difficult that is |
Depending on how you're parsing the python, you can notice the except clause can only follow a try clause, and the next time something is at same level, then you're our of try clause. |
i'll probably do this:
and use |
CLN: fix python26 invalid exception
No description provided.