]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-126499: test_ssl: Don't assume err.reason is a string (GH-126501)
authorPetr Viktorin <encukou@gmail.com>
Thu, 7 Nov 2024 10:06:27 +0000 (11:06 +0100)
committerGitHub <noreply@github.com>
Thu, 7 Nov 2024 10:06:27 +0000 (11:06 +0100)
commit78ad7e632248dc989378cabeb797b9f3d940d9f2
treef2c11dffa28e26324ef756e1f6114b023c9fad3d
parent1fe67df8e373a5177143e4a310c83438e79f9b77
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.
Lib/test/test_ssl.py