mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Issue #13303: Fix bytecode file default permission.
This commit is contained in:
parent
1db7c13be1
commit
0c929d9d39
3 changed files with 13 additions and 17 deletions
|
@ -88,7 +88,7 @@ def _write_atomic(path, data):
|
|||
# On POSIX-like platforms, renaming is atomic. id() is used to generate
|
||||
# a pseudo-random filename.
|
||||
path_tmp = '{}.{}'.format(path, id(path))
|
||||
fd = _os.open(path_tmp, _os.O_EXCL | _os.O_CREAT | _os.O_WRONLY)
|
||||
fd = _os.open(path_tmp, _os.O_EXCL | _os.O_CREAT | _os.O_WRONLY, 0o666)
|
||||
try:
|
||||
with _io.FileIO(fd, 'wb') as file:
|
||||
file.write(data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue