From: Florent Bruneau Date: Thu, 18 Dec 2008 07:42:38 +0000 (+0100) Subject: Fix list creation. X-Git-Tag: xorg/1.0.0~332^2~344^2~62 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=f72731f698b36c12306361fdd881a4a5ae9913e7;p=platal.git Fix list creation. Signed-off-by: Florent Bruneau --- diff --git a/bin/lists.rpc.py b/bin/lists.rpc.py index 85bc78e..0becf2f 100755 --- a/bin/lists.rpc.py +++ b/bin/lists.rpc.py @@ -787,8 +787,7 @@ def check_options_runner(userdesc, perms, mlist, listname, correct): if mlist.real_name.lower() != listname: options['real_name'] = listname, mlist.real_name if correct: mlist.real_name = listname - details = get_list_info(userdesc, perms, mlist)[0] - return (details, options) + return 1 def check_options(userdesc, perms, vhost, listname, correct=False): @@ -868,25 +867,22 @@ def create_list(userdesc, perms, vhost, listname, desc, advertise, modlevel, ins mlist.header_filter_rules = [] mlist.header_filter_rules.append(('X-Spam-Flag: Unsure, tests=bogofilter', mm_cfg.HOLD, False)) mlist.header_filter_rules.append(('X-Spam-Flag: Yes, tests=bogofilter', mm_cfg.HOLD, False)) - mlist.Save() - mlist.Unlock() if ON_CREATE_CMD != '': try: os.system(ON_CREATE_CMD + ' ' + name) except: pass - check_options(userdesc, perms, mlist, True) + check_options_runner(userdesc, perms, mlist, listname.lower(), True) mass_subscribe(userdesc, perms, mlist, members) - - # avoid the "-1 mail to moderate" bug - mlist = MailList.MailList(name) - mlist._UpdateRecords() mlist.Save() - - return 1 finally: mlist.Unlock() - return 0 + + # avoid the "-1 mail to moderate" bug + mlist = MailList.MailList(name) + mlist._UpdateRecords() + mlist.Save() + return 1 def delete_list(userdesc, perms, mlist, del_archives=0): """ Delete the list.