[Mailman-Users] Withlist Errors

Robert Haack haack at nclack.k12.or.us
Wed Dec 14 23:53:03 CET 2005


I'm working on a procedure to change the number of recipients in lists. 
Following a sample Mark Sapiro (Thank You Mark) I created the below
procedure.  When I run it though I a bunch of errors.  Being that I know
nothing about Python I was hoping that one of you might be able to point
out what is wrong here.  If I need to post this to the python list
instead just let me know.

def cng_no_recipents(mlist):
   mlist.Lock()
   mlist.max_num_recipients = 100
   mlist.Save()
   mlist.Unlock()


[root at nclack bin]# ./withlist -l -r cngnorecipe.cng_no_recipents test3
Importing cngnorecipe...
Running cngnorecipe.cng_no_recipents()...
Loading list test3 (locked)
Traceback (most recent call last):
  File "./withlist", line 275, in ?
    main()
  File "./withlist", line 256, in main
    r = do_list(listname, args, func)
  File "./withlist", line 189, in do_list
    return func(m, *args)
  File "/var/mailman/bin/cngnorecipe.py", line 2, in cng_no_recipents
    mlist.Lock()
  File "/var/mailman/Mailman/MailList.py", line 159, in Lock
    self.__lock.lock(timeout)
  File "/var/mailman/Mailman/LockFile.py", line 291, in lock
    raise AlreadyLockedError
Mailman.LockFile.AlreadyLockedError
Unlocking (but not saving) list: test3
Finalizing

TIA

-- 
Robert Haack
Programmer Analyst
North Clackamas School District #12
haack at nclack.k12.or.us




More information about the Mailman-Users mailing list