[Mailman-Developers] Determining if a user or list has moderation

Jeff Kunzelman (DHL) Jeff.Kunzelman at dhl.com
Thu Apr 12 18:48:28 CEST 2007

I'm trying to write a script to determine what lists have users that
have moderation turned on. I found the following example in the list
archives using the withlist command

from Mailman import mm_cfg

def list_moderated(m):
    for member in m.getMembers():
        if m.getMemberOption(member, mm_cfg.Moderate):
            print member

However when I run the command:

withlist -q -r checkModerated.py jww_test

I get the following error:
Traceback (most recent call last):
  File "/home/mailman/bin/withlist", line 297, in ?
  File "/home/mailman/bin/withlist", line 269, in main
    func = getattr(mod, callable)
AttributeError: 'module' object has no attribute 'py'

This seems pretty simple to me, but I don't have any python experience,
this is my first brush with python. I do know perl, java and assorted
other programming languages but you have to start somewhere when
learning something new. Any help would be appreciated. Or you can
forward this to your co-workers to make fun of the n00b.

Jeff Kunzelman
Principal Systems Engineer - Messaging Infrastructure
DHL Worldwide Express - AMIS
8701 East Hartford Drive
Scottsdale, AZ 85255

More information about the Mailman-Developers mailing list