summaryrefslogtreecommitdiffstats
path: root/Lib/_pyio.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-10-12 00:54:14 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-10-12 00:54:14 (GMT)
commit6b4883dec0b7f6c5ede45dca861f5dc0e4ff2be7 (patch)
treee731290ba41ff9208385bebbe402282ecbbd682f /Lib/_pyio.py
parent983b1434bda1819864fb5d82248f249358a4c22d (diff)
downloadcpython-6b4883dec0b7f6c5ede45dca861f5dc0e4ff2be7.zip
cpython-6b4883dec0b7f6c5ede45dca861f5dc0e4ff2be7.tar.gz
cpython-6b4883dec0b7f6c5ede45dca861f5dc0e4ff2be7.tar.bz2
PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy.
Diffstat (limited to 'Lib/_pyio.py')
-rw-r--r--Lib/_pyio.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index a9c31d5..0611bd6 100644
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -23,16 +23,8 @@ DEFAULT_BUFFER_SIZE = 8 * 1024 # bytes
# defined in io.py. We don't use real inheritance though, because we don't
# want to inherit the C implementations.
-
-class BlockingIOError(IOError):
-
- """Exception raised when I/O would block on a non-blocking I/O stream."""
-
- def __init__(self, errno, strerror, characters_written=0):
- super().__init__(errno, strerror)
- if not isinstance(characters_written, int):
- raise TypeError("characters_written must be a integer")
- self.characters_written = characters_written
+# Rebind for compatibility
+BlockingIOError = BlockingIOError
def open(file, mode="r", buffering=-1, encoding=None, errors=None,