[Python-checkins] cpython (2.7): Fix for issue #16800: Use buffered write to handle EINTR.
serhiy.storchaka
python-checkins at python.org
Wed Feb 13 00:02:27 CET 2013
http://hg.python.org/cpython/rev/a43f67e95ef0
changeset: 82185:a43f67e95ef0
branch: 2.7
parent: 82181:b368fc93dca8
user: Serhiy Storchaka <storchaka at gmail.com>
date: Wed Feb 13 00:59:11 2013 +0200
summary:
Fix for issue #16800: Use buffered write to handle EINTR.
files:
Lib/tempfile.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -197,8 +197,8 @@
fd = _os.open(filename, flags, 0o600)
try:
try:
- fp = _io.open(fd, 'wb', buffering=0, closefd=False)
- fp.write(b'blat')
+ with _io.open(fd, 'wb', closefd=False) as fp:
+ fp.write(b'blat')
finally:
_os.close(fd)
finally:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list