Issue #13303: Fix bytecode file default permission.

This commit is contained in:
Charles-François Natali 2011-11-10 19:12:29 +01:00
parent 1db7c13be1
commit 0c929d9d39
3 changed files with 13 additions and 17 deletions

View file

@ -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)