Skip to content

Commit b578feb

Browse files
committed
Remove unnecessary comments and try/except - calls succeed after fix
1 parent 12c8272 commit b578feb

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

Lib/test/test_socket.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7523,12 +7523,7 @@ def __buffer__(self, flags):
75237523
left, right = socket.socketpair()
75247524
self.addCleanup(left.close)
75257525
self.addCleanup(right.close)
7526-
# Should not crash. With the fix, the call succeeds;
7527-
# without the fix, it would crash (SIGSEGV).
7528-
try:
7529-
left.sendmsg(seq)
7530-
except (TypeError, OSError):
7531-
pass # Also acceptable
7526+
left.sendmsg(seq)
75327527

75337528
@unittest.skipUnless(hasattr(socket.socket, "recvmsg_into"),
75347529
"recvmsg_into not supported")
@@ -7554,12 +7549,7 @@ def __buffer__(self, flags):
75547549
self.addCleanup(left.close)
75557550
self.addCleanup(right.close)
75567551
left.send(b'Hello World!')
7557-
# Should not crash. With the fix, the call succeeds;
7558-
# without the fix, it would crash (SIGSEGV).
7559-
try:
7560-
right.recvmsg_into(seq)
7561-
except (TypeError, OSError):
7562-
pass # Also acceptable
7552+
right.recvmsg_into(seq)
75637553

75647554

75657555
def setUpModule():

0 commit comments

Comments
 (0)