Fix for issue #16800: Use buffered write to handle EINTR.
This commit is contained in:
parent
0127de0b87
commit
7d360038f5
|
@ -197,8 +197,8 @@ def _get_default_tempdir():
|
||||||
fd = _os.open(filename, flags, 0o600)
|
fd = _os.open(filename, flags, 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)
|
||||||
finally:
|
finally:
|
||||||
|
|
Loading…
Reference in New Issue