[Python-checkins] cpython (merge 3.3 -> default): Fix for issue #16800: Use buffered write to handle EINTR.
serhiy.storchaka
python-checkins at python.org
Wed Feb 13 00:02:31 CET 2013
http://hg.python.org/cpython/rev/fec33725f319
changeset: 82188:fec33725f319
parent: 82184:b66a5b41d82f
parent: 82187:2fb03fe354e3
user: Serhiy Storchaka <storchaka at gmail.com>
date: Wed Feb 13 01:00:17 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
@@ -176,8 +176,8 @@
fd = _os.open(filename, _bin_openflags, 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