Fix TypeError in parser's error-wrapping logic#987
Merged
pganssle merged 2 commits intodateutil:masterfrom Jan 2, 2020
Merged
Conversation
Member
|
Thanks for this @eastface, it looks great to me. The appveyor failure seems unrelated. I'll rebase and merge this tonight or tomorrow. |
Member
|
@eastface I have reworded the changelog message a bit, please take a look and let me know if you find it acceptable. If so I'll squash it into your original commit and merge. Thanks again for your contribution! |
Contributor
Author
|
Yes, no problems with that. Glad I was able to help. |
In attempting to pass-through the string representation of an exception we are wrapping, we made the erroneous assumption that `args[0]` would always be a string (or something that can concatenate cleanly with a string). This turns out not to be the case with `IllegalMonthError`, where it is an integer, so to avoid raising an erroneous `TypeError`, we first convert the wrapped exception to a string. See GH issue dateutil#981.
Member
|
Thanks again @eastface. There are a few more bugfixes I'd like to get merged, but we can cut a 2.8.2 release soon-ish. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
Guard against an integer value in ValueError args. This is known to occur with IllegalMonthError.
Closes #981
Pull Request Checklist