Hello all,

I am trying to change moderation settings on some lists via a script so I can automate the list management for several lists (approx. 30 lists).

In the script I use the following to run set_mod.py:

/usr/lib/mailman/bin/withlist --run /usr/lib/mailman/bin/set_mod LISTNAME --unset [email protected]

however, I get the following error back:

     Importing /usr/lib/mailman/bin/set_mod...
     Traceback (most recent call last):
       File "/usr/lib/mailman/bin/withlist", line 297, in ?
         main()
       File "/usr/lib/mailman/bin/withlist", line 266, in main
         mod = __import__(module)
     ImportError: No module named /usr/lib/mailman/bin/set_mod

Just to make sure I am running withlist and set_mod correctly, I did change into the mailman directory (/usr/lib/mailman) and run the command as recommended in the documentation:

  bin/withlist --run bin/set_mod LISTNAME --unset [email protected]

and, I get back the following error:

     Importing bin/set_mod...
     Running bin/set_mod.bin/set_mod()...
     Traceback (most recent call last):
       File "bin/withlist", line 297, in ?
         main()
       File "bin/withlist", line 269, in main
         func = getattr(mod, callable)
     AttributeError: 'module' object has no attribute 'bin/set_mod'

I tried adding the .py at the end of set_mod but I get a different error.

As a matter of fact, things went from bad to worse. All the different trys I did may have corrupted my test list. I had to delete the list and recreate it.

Is there a magic incantation so I can run set_mod.py in a script like my first command above? Is there an easy way to modify set_mod.py so I can run it without using withlist (like add_members, remove_members, etc.)?

Thanks for an help and any advice,
Chris
------------------------------------------------------
Mailman-Users mailing list [email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to