X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Flists.rpc.py;h=9ed42d81df165ea6368ee10ca40c4fe13ff31475;hb=50e2ba896a958d451e3e8a04364c5909082aaab9;hp=dd959f3023a8f3a5b13a01534071a7510ad07055;hpb=684195f33b11e3067200dd3a9e14304bd7d04463;p=platal.git diff --git a/bin/lists.rpc.py b/bin/lists.rpc.py index dd959f3..9ed42d8 100755 --- a/bin/lists.rpc.py +++ b/bin/lists.rpc.py @@ -105,9 +105,10 @@ class BasicAuthXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): except: raise Exception('method "%s" is not supported' % method) + def is_rpc_path_valid(self): + return True def _dispatch(self, method, params): - new_params = list(params) return list_call_dispatcher(self._get_function(method), self.data[0], self.data[1], self.data[2], *params) def do_POST(self): @@ -195,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' @@ -881,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):