Skip to content
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

Fixes #7598: Use safe_repr function to display alert reprs; catch UnicodeDecodeError in all alert handlers #7616

Conversation

kozlovsky
Copy link
Contributor

This PR fixes #7598. Now the UnicodeDecode error is handled not only in on_tracker_error_alert, but in all other handlers as well.

@kozlovsky kozlovsky requested review from a team and drew2a and removed request for a team October 2, 2023 11:20
@kozlovsky kozlovsky force-pushed the fix/on_tracker_reply_alert_unicode_decode_error branch from 31f122e to 02ee0b5 Compare October 2, 2023 12:04
url = alert.url

if alert.msg:
status = 'Error: ' + alert.msg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this line should be tested since some portions of this function have already been covered by tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added more tests to cover all branches of this function

@kozlovsky kozlovsky requested a review from drew2a October 2, 2023 13:24
@kozlovsky kozlovsky merged commit 8100620 into Tribler:release/7.13 Oct 2, 2023
16 checks passed
@kozlovsky kozlovsky deleted the fix/on_tracker_reply_alert_unicode_decode_error branch October 2, 2023 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants