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 #7406 UnicodeDecodeError in on_tracker_error_alert #7468

Merged

Conversation

kozlovsky
Copy link
Contributor

This PR fixes #7406 by moving the self._logger.error call into the try/except block. It also replaces self._logger.exception with self._logger.warning in case of an error, as the error's origin is known and handled adequately by the workaround.

Initially, in the discussion of #7410, I suggested adding a safe_repr function to wrap alert with it, but according to arvidn/libtorrent#143, on_tracker_error_alert is the only place where the error can happen, so it is not necessary to implement a reusable function for safe_alert, as other on_xyz_alert handlers do not require a fix.

@kozlovsky kozlovsky requested review from a team and xoriole and removed request for a team June 8, 2023 15:13
@kozlovsky kozlovsky force-pushed the fix/on_tracker_error_alert branch 2 times, most recently from e74157f to 8e60622 Compare June 9, 2023 13:39
@kozlovsky kozlovsky requested a review from drew2a June 9, 2023 14:36
@kozlovsky kozlovsky merged commit c80f825 into Tribler:release/7.13 Jun 9, 2023
@kozlovsky kozlovsky deleted the fix/on_tracker_error_alert branch June 9, 2023 17:07
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