mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Fix for issue #16800: Use buffered write to handle EINTR.
This commit is contained in:
commit
bebd2063e1
1 changed files with 2 additions and 2 deletions
|
@ -174,8 +174,8 @@ def _get_default_tempdir():
|
|||
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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue