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

Modified Files:
      Tag: Release_2_1-maint
        MailList.py 
Log Message:
Load(): Only gain the lock and attempt to repair the config file if file ==
plast or file == dlast.


Index: MailList.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/MailList.py,v
retrieving revision 2.100.2.17
retrieving revision 2.100.2.18
diff -u -d -r2.100.2.17 -r2.100.2.18
--- MailList.py 4 Mar 2004 03:35:36 -0000       2.100.2.17
+++ MailList.py 4 Mar 2004 14:06:01 -0000       2.100.2.18
@@ -610,16 +610,18 @@
         # copy the fallback into the primary so that the logic in Save() will
         # still work.  For giggles, we'll copy it to a safety backup.  Note we
         # MUST do this with the underlying list lock acquired.
-        unlock = True
-        try:
+        if file == plast or file == dlast:
+            syslog('error', 'fixing corrupt config files')
+            unlock = True
             try:
-                self.__lock.lock()
-            except LockFile.AlreadyLockedError:
-                unlock = False
-            self.__fix_corrupt_pckfile(file, pfile, plast, dfile, dlast)
-        finally:
-            if unlock:
-                self.__lock.unlock()
+                try:
+                    self.__lock.lock()
+                except LockFile.AlreadyLockedError:
+                    unlock = False
+                self.__fix_corrupt_pckfile(file, pfile, plast, dfile, dlast)
+            finally:
+                if unlock:
+                    self.__lock.unlock()
         # Copy the loaded dictionary into the attributes of the current
         # mailing list object, then run sanity check on the data.
         self.__dict__.update(dict)


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

Reply via email to