summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
authorCharles-François Natali <neologix@free.fr>2011-11-10 18:12:29 (GMT)
committerCharles-François Natali <neologix@free.fr>2011-11-10 18:12:29 (GMT)
commit0c929d9d397c2a2578a2b016ae9b3d258ab513aa (patch)
treeffd2b8398314f5c52ecb0ce7052351bf57a82d0b /Lib/importlib
parent1db7c13be1cbf29af66306b471bc826dadb8efa4 (diff)
downloadcpython-0c929d9d397c2a2578a2b016ae9b3d258ab513aa.zip
cpython-0c929d9d397c2a2578a2b016ae9b3d258ab513aa.tar.gz
cpython-0c929d9d397c2a2578a2b016ae9b3d258ab513aa.tar.bz2
Issue #13303: Fix bytecode file default permission.
Diffstat (limited to 'Lib/importlib')
-rw-r--r--Lib/importlib/_bootstrap.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
index 775fa85..209e041 100644
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -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)