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()


[EMAIL PROTECTED] 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
[EMAIL PROTECTED]

------------------------------------------------------
Mailman-Users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp

Reply via email to