[Python-checkins] r69852 - python/branches/io-c/Lib/_pyio.py
benjamin.peterson
python-checkins at python.org
Sat Feb 21 23:36:09 CET 2009
Author: benjamin.peterson
Date: Sat Feb 21 23:36:09 2009
New Revision: 69852
Log:
fix a BlockingIOError.characters_written bug
Modified:
python/branches/io-c/Lib/_pyio.py
Modified: python/branches/io-c/Lib/_pyio.py
==============================================================================
--- python/branches/io-c/Lib/_pyio.py (original)
+++ python/branches/io-c/Lib/_pyio.py Sat Feb 21 23:36:09 2009
@@ -986,8 +986,9 @@
# We've hit max_buffer_size. We have to accept a
# partial write and cut back our buffer.
overage = len(self._write_buf) - self.max_buffer_size
+ written -= overage
self._write_buf = self._write_buf[:self.max_buffer_size]
- raise BlockingIOError(e.errno, e.strerror, overage)
+ raise BlockingIOError(e.errno, e.strerror, written)
return written
def truncate(self, pos=None):
More information about the Python-checkins
mailing list