Ensure config files are readable by all.
This commit is contained in:
parent
1db777fd9e
commit
9883a86228
@ -43,6 +43,7 @@ def write_file(path, contents):
|
||||
os.path.exists(d) or os.makedirs(d)
|
||||
with NamedTemporaryFile(dir=d, delete=False) as newfile:
|
||||
newfile.write(contents)
|
||||
os.chmod(newfile.name, 0644)
|
||||
os.rename(newfile.name, path)
|
||||
|
||||
# return a map of filenames->filecontents
|
||||
|
Loading…
x
Reference in New Issue
Block a user