Visitar URL original
gh-98174: Handle EPROTOTYPE under macOS in test_sendfile_fallback_close_peer_in_the_middle_of_receiving by fancidev · Pull Request #98316 · python/cpython · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
No need to raise 'from' within except block.
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
  • Loading branch information
fancidev and sobolevn authored Oct 17, 2022
commit cf9178a3baab94fcee1e9dbbd6d58e3f246767d2
2 changes: 1 addition & 1 deletion Lib/test/test_asyncio/test_sendfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ def sendfile_native(transp, file, offset, count):
# macOS may raise OSError of EPROTOTYPE when writing to a
# socket that is in the process of closing down.
if e.errno == errno.EPROTOTYPE and sys.platform == "darwin":
raise ConnectionError from e
raise ConnectionError
else:
raise

Expand Down