Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d62f100

Browse filesBrowse files
[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 78ad7e6) Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent 75d251b commit d62f100
Copy full SHA for d62f100

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎Lib/test/test_ssl.py

Copy file name to clipboardExpand all lines: Lib/test/test_ssl.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4817,7 +4817,7 @@ def non_linux_skip_if_other_okay_error(self, err):
48174817
return # Expect the full test setup to always work on Linux.
48184818
if (isinstance(err, ConnectionResetError) or
48194819
(isinstance(err, OSError) and err.errno == errno.EINVAL) or
4820-
re.search('wrong.version.number', getattr(err, "reason", ""), re.I)):
4820+
re.search('wrong.version.number', str(getattr(err, "reason", "")), re.I)):
48214821
# On Windows the TCP RST leads to a ConnectionResetError
48224822
# (ECONNRESET) which Linux doesn't appear to surface to userspace.
48234823
# If wrap_socket() winds up on the "if connected:" path and doing

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.