Skip to content

Commit 8286a0a

Browse files
committed
Align BlockingIOError message in _pyio.py with the C implementation in textio.c
1 parent cabdf39 commit 8286a0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/_pyio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2526,7 +2526,8 @@ def read(self, size=None):
25262526

25272527
chunk = self.buffer.read()
25282528
if chunk is None:
2529-
raise BlockingIOError
2529+
raise BlockingIOError("Unexpected None encountered. This may be due to non-blocking I/O or an issue "
2530+
"with the underlying I/O implementation.")
25302531

25312532
# Read everything.
25322533
result = (self._get_decoded_chars() +

0 commit comments

Comments
 (0)