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

[3.13] gh-126499: test_ssl: Don't assume err.reason is a string (GH-126501) #126574

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Nov 8, 2024

The skipping machinery called getattr(err, "reason", "") on an arbitrary
exception. As intermittent Buildbot failures show, sometimes it's set
to None.

Convert it to string for this specific check.
(cherry picked from commit 78ad7e6)

Co-authored-by: Petr Viktorin encukou@gmail.com

…nGH-126501)

The skipping machinery called `getattr(err, "reason", "")` on an arbitrary
exception. As intermittent Buildbot failures show, sometimes it's set
to None.

Convert it to string for this specific check.
(cherry picked from commit 78ad7e6)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Copy link

@ruidazeng ruidazeng left a comment

Choose a reason for hiding this comment

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

Make sense! If err is None and then the original code will fail.

@encukou encukou merged commit 1e4b9c7 into python:3.13 Nov 11, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants