Fix for issue #16800: Use buffered write to handle EINTR.

This commit is contained in:
Serhiy Storchaka 2013-02-13 00:59:26 +02:00
parent f6b361ec1a
commit 76a2ed1398
1 changed files with 2 additions and 2 deletions

View File

@ -177,7 +177,7 @@ def _get_default_tempdir():
fd = _os.open(filename, _bin_openflags, 0o600) fd = _os.open(filename, _bin_openflags, 0o600)
try: try:
try: try:
fp = _io.open(fd, 'wb', buffering=0, closefd=False) with _io.open(fd, 'wb', closefd=False) as fp:
fp.write(b'blat') fp.write(b'blat')
finally: finally:
_os.close(fd) _os.close(fd)