X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=bin%2Flists.rpc.py;h=9ed42d81df165ea6368ee10ca40c4fe13ff31475;hb=dbcc3b3d73d14d7c6843397ce2b3a12f0b60e3e1;hp=3b5314841976774b67e3d15b8575f5fefa89429a;hpb=c6aeb88a8b5c20ab1c113401913abedc9f78c47b;p=platal.git diff --git a/bin/lists.rpc.py b/bin/lists.rpc.py index 3b53148..9ed42d8 100755 --- a/bin/lists.rpc.py +++ b/bin/lists.rpc.py @@ -196,7 +196,7 @@ def to_forlife(email): if ( fqdn == PLATAL_DOMAIN ) or ( fqdn == PLATAL_DOMAIN2 ): res = mysql_fetchone("""SELECT CONCAT(f.alias, '@%s'), a.full_name FROM accounts AS a - INNER JOIN aliases AS f ON (f.uid = a.uid AND f.type = 'a_vie') + INNER JOIN aliases AS f ON (f.uid = a.uid AND f.type = 'a_vie') INNER JOIN aliases AS aa ON (aa.uid = a.uid AND aa.alias = '%s' AND a.type != 'homonyme') WHERE a.state = 'active' @@ -882,8 +882,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):