setting 0644 permissions on mkstemp file handles. Fixes issue #3857

This commit is contained in:
sjahl 2013-08-18 11:03:43 -04:00
parent 5847720746
commit 4dd68c07a0

View file

@ -182,6 +182,7 @@ class SourcesList(object):
if sources: if sources:
d, fn = os.path.split(filename) d, fn = os.path.split(filename)
fd, tmp_path = tempfile.mkstemp(prefix=".%s-" % fn, dir=d) fd, tmp_path = tempfile.mkstemp(prefix=".%s-" % fn, dir=d)
os.chmod(os.path.join(fd, tmp_path), 0644)
with os.fdopen(fd, 'w') as f: with os.fdopen(fd, 'w') as f:
for n, valid, enabled, source, comment in sources: for n, valid, enabled, source, comment in sources: