]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-126499: test_ssl: Don't assume err.reason is a string (GH-126501) (GH-126573)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 11 Nov 2024 12:56:08 +0000 (13:56 +0100)
committerGitHub <noreply@github.com>
Mon, 11 Nov 2024 12:56:08 +0000 (13:56 +0100)
commitd62f100fe1184c3d14d1ee51cfaaf3542c236ae7
treecf40908aafdb7ca3be0eee5307171ca0cef0bcd6
parent75d251bb04a7fe6386c2d7675bb9cd750add5fe5
[3.12] gh-126499: test_ssl: Don't assume err.reason is a string (GH-126501) (GH-126573)

gh-126499: test_ssl: Don't assume err.reason is a string (GH-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 78ad7e632248dc989378cabeb797b9f3d940d9f2)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Lib/test/test_ssl.py