misc: write files as binaries (#36515)
This commit is contained in:
parent
1ea19f1c74
commit
48ffcf975a
|
@ -71,7 +71,7 @@ def atomic_write(path, content, async_op=False):
|
|||
fd, temp = tempfile.mkstemp(dir=dirname,
|
||||
prefix='.tmp-'+os.path.basename(path)+'-')
|
||||
os.fchmod(fd, 0o666 & ~process_umask)
|
||||
f = os.fdopen(fd, "w")
|
||||
f = os.fdopen(fd, "wb")
|
||||
if hasattr(content, 'read'):
|
||||
# file pointer
|
||||
def read100k():
|
||||
|
|
Loading…
Reference in New Issue