Update of /cvsroot/mailman/mailman/Mailman/Cgi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16148

Modified Files:
      Tag: Release_2_1-maint
        edithtml.py 
Log Message:
ChangeHTML(): Set umask to 0 while creating the langdir.  Fixes SF bug
#1190404


Index: edithtml.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Cgi/edithtml.py,v
retrieving revision 2.16.2.1
retrieving revision 2.16.2.2
diff -u -d -r2.16.2.1 -r2.16.2.2
--- edithtml.py 28 Dec 2004 04:11:59 -0000      2.16.2.1
+++ edithtml.py 2 May 2005 21:31:00 -0000       2.16.2.2
@@ -158,10 +158,14 @@
     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)

_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to