[Mailman-Users] "IOError reading list extension" Message

Mark Sapiro mark at msapiro.net
Fri Apr 25 23:30:56 CEST 2008

Barry Finkel wrote:
>     #!/bin/csh
>     foreach list (`ls /var/lib/mailman/lists`)
>          /usr/lib/mailman/bin/list_members -o $destdir/$list $list
>     end
>I also do not have a check in this script.  I am using 
>     foreach list (`ls /var/lib/mailman/lists`)
>and not
>     Utils.list_lists())
>to get a list of lists.  I assume that the Utils.list_lists()) code
>has the check that I do not have in "foreach list".

Thanks for the info. It appears I erroneously assumed from the 08:00:03
timestamp in your OP that it was cron/checkdbs, but it now seems it is
all from your scripts which do not check that the names in
`ls /var/lib/mailman/lists` are all valid lists.

If you would use `/usr/lib/mailman/bin/list_lists -b` instead of
`ls /var/lib/mailman/lists`, you would avoid this problem.

Your code is OK as long as all the names in `ls /var/lib/mailman/lists`
are in fact lists, but it fails when this isn't true.

And yes, the Utils.list_lists() function only returns the names of
directories that contain a config.pck or config.db file.

So, bottom line, use `bin/list_lists -b` instead of `ls lists` to get
the list names, and you won't need to worry about whether or not a
name is a list.

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list