-
Notifications
You must be signed in to change notification settings - Fork 4
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
Catch another possible exception when determining the timezone. #153
Conversation
AFAICT the exception comes from the In other words, can you please provide a quick analysis of that actual localtime link there and whether it's feasible to extract the actual zoneinfo we need or push and update / let me know if I should just add the comment? |
Happy to try, but I don't think that analysis is exactly what's happening - from what I saw, it's a difference in the string returned when calling localtime so when assume thing about it to break it up leading to the ValueError instead of an IndexError. Catching this extra possible exception doesn't make reading the timezone work under BSD, but it means the fallback path gets taken and things start to work. At the time I applied this change I figured a small change so the suite works, albeit not reading this value entirely correctly, was a decent trade-off. |
Thanks, your patch adds the
we extract the My suggestion would therefore be to look if it's a link to something similar with a name in we can grab on BSD. If not I'm fine with any solution that bails out gracefully but just briefly explains how/why. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically looks safe and alright to me, but a line or two explaining where and why we might hit that ValueError
would be good if we can't easily similarly extract the value on BSD.
Please refer to my previous PR comments for details.
This change makes the test suite run to completion under FreeBSD.
e53d343
to
361c015
Compare
Merged through svn with minor comment polish. Thanks @albu-diku :) |
This change makes the test suite run to completion under FreeBSD.