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

Ignore invalid encoding in Address string representation #307

Merged
merged 1 commit into from Nov 3, 2017

Conversation

2 participants
@mlorant
Contributor

mlorant commented Oct 30, 2017

Fixes #243

@NicolasLM

This comment has been minimized.

Show comment
Hide comment
@NicolasLM

NicolasLM Oct 31, 2017

Collaborator

It's probably the way to go but I'm a bit reluctant to let things be silently ignored. Could we log a warning?

Collaborator

NicolasLM commented Oct 31, 2017

It's probably the way to go but I'm a bit reluctant to let things be silently ignored. Could we log a warning?

@mlorant

This comment has been minimized.

Show comment
Hide comment
@mlorant

mlorant Oct 31, 2017

Contributor

Indeed, I can use a try/except, issuing a warning and using .encode again but with 'ignore' in case of exception.

Contributor

mlorant commented Oct 31, 2017

Indeed, I can use a try/except, issuing a warning and using .encode again but with 'ignore' in case of exception.

Ignore invalid encoding in Address string representation
Those strings can be found in malformed e-mails where strings have
been encoded incorrectly. The original data can still be accessed
through the Address namedtuple in case of debugging or if the user
really wants to deal with the garbage.

@NicolasLM NicolasLM merged commit 278edd0 into mjs:master Nov 3, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@NicolasLM

This comment has been minimized.

Show comment
Hide comment
@NicolasLM

NicolasLM Nov 3, 2017

Collaborator

Perfect 👌

Collaborator

NicolasLM commented Nov 3, 2017

Perfect 👌

@mlorant

This comment has been minimized.

Show comment
Hide comment
@mlorant

mlorant Nov 3, 2017

Contributor

Should also be merged in 1.1.0 branch (see milestone on #243) :)

Contributor

mlorant commented Nov 3, 2017

Should also be merged in 1.1.0 branch (see milestone on #243) :)

@NicolasLM

This comment has been minimized.

Show comment
Hide comment
@NicolasLM

NicolasLM Nov 3, 2017

Collaborator

#306 should also be backported to 1.1.0. We don't have a handy place to write this down 😞

Collaborator

NicolasLM commented Nov 3, 2017

#306 should also be backported to 1.1.0. We don't have a handy place to write this down 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment