diff options
author | bwarsaw <> | 2005-05-02 21:31:00 +0000 |
---|---|---|
committer | bwarsaw <> | 2005-05-02 21:31:00 +0000 |
commit | 9c4a53e6ffaa5835b88a8f40d2b5c95ee170f648 (patch) | |
tree | b7a8ff2d8770c0fce5e6da481c5f0e9eb90c4700 /Mailman | |
parent | 76e9f8fbee0865be1564e099cd5b90187406bad8 (diff) | |
download | mailman2-9c4a53e6ffaa5835b88a8f40d2b5c95ee170f648.tar.gz mailman2-9c4a53e6ffaa5835b88a8f40d2b5c95ee170f648.tar.xz mailman2-9c4a53e6ffaa5835b88a8f40d2b5c95ee170f648.zip |
ChangeHTML(): Set umask to 0 while creating the langdir. Fixes SF bug
#1190404
Diffstat (limited to '')
-rw-r--r-- | Mailman/Cgi/edithtml.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Mailman/Cgi/edithtml.py b/Mailman/Cgi/edithtml.py index 493763b4..756b6c34 100644 --- a/Mailman/Cgi/edithtml.py +++ b/Mailman/Cgi/edithtml.py @@ -158,10 +158,14 @@ def ChangeHTML(mlist, cgi_info, template_name, doc): code = cgi_info['html_code'].value langdir = os.path.join(mlist.fullpath(), mlist.preferred_language) # Make sure the directory exists + omask = os.umask(0) try: - os.mkdir(langdir, 02775) - except OSError, e: - if e.errno <> errno.EEXIST: raise + try: + os.mkdir(langdir, 02775) + except OSError, e: + if e.errno <> errno.EEXIST: raise + finally: + os.umask(omask) fp = open(os.path.join(langdir, template_name), 'w') try: fp.write(code) |