Skip to content

Commit 55fa7bf

Browse files
committed
pythongh-120162: Fix flaky test test_preauth_data_to_tls_server in test_ssl.
1 parent 14e1506 commit 55fa7bf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/test/test_ssl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4969,7 +4969,7 @@ def non_linux_skip_if_other_okay_error(self, err):
49694969
return # Expect the full test setup to always work on Linux.
49704970
if (isinstance(err, ConnectionResetError) or
49714971
(isinstance(err, OSError) and err.errno == errno.EINVAL) or
4972-
re.search('wrong.version.number', getattr(err, "reason", ""), re.I)):
4972+
re.search('wrong.version.number', getattr(err, "reason", "") or "", re.I)):
49734973
# On Windows the TCP RST leads to a ConnectionResetError
49744974
# (ECONNRESET) which Linux doesn't appear to surface to userspace.
49754975
# If wrap_socket() winds up on the "if connected:" path and doing
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix flaky test :func:`test.test_ssl.test_preauth_data_to_tls_server` caused by bug in :func:`test.test_ssl.non_linux_skip_if_other_okay_error`. Patched by Clinton Christian (pygeek).

0 commit comments

Comments
 (0)