Add missing Unlock on ML creation.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Mon, 17 May 2010 19:50:42 +0000 (21:50 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Mon, 17 May 2010 19:50:42 +0000 (21:50 +0200)
WARNING: this patch requires mailman *and* the rpc to be restarted.

Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
bin/lists.rpc.py

index 694cee9..c0a08a1 100755 (executable)
@@ -875,8 +875,11 @@ def create_list(userdesc, perms, vhost, listname, desc, advertise, modlevel, ins
 
     # avoid the "-1 mail to moderate" bug
     mlist = MailList.MailList(name)
-    mlist._UpdateRecords()
-    mlist.Save()
+    try:
+        mlist._UpdateRecords()
+        mlist.Save()
+    finally:
+        mlist.Unlock()
     return 1
 
 def delete_list(userdesc, perms, mlist, del_archives=0):