Help with one of Mark's scripts

I'm trying to run the nonmembers_modify-py script here https://www.msapiro.net/scripts/non_members
but keep getting the error that the lists are non-existent.
I’m trying to add a non-member accept to a bunch of our Class_of lists:
[root@dhbmailman1 bin]# ./list_lists | grep Class Class_of_21 - Generated from Oracle Class_of_21_phx - Generated from Oracle Class_of_21_tuc - Generated from Oracle Class_of_22 - Generated from Oracle Class_of_22_phx - Generated from Oracle Class_of_22_tuc - Generated from Oracle Class_of_23 - Generated from Oracle Class_of_23_phx - Generated from Oracle Class_of_23_tuc - Generated from Oracle Class_of_24 - Generated from Oracle Class_of_24_phx - Generated from Oracle Class_of_24_tuc - Generated from Oracle
I've tried both ./nonmembers_modify.py -l Class_of_21_tuc -f accept -a address@to_add and ./nonmembers_modify.py -l Class_of_21_tuc@pharmacy.arizona.edu -f accept -a address@to_add
And both get the error Non-existent list
[root@dhbmailman1 bin]# ./nonmember_modify.py -l Class_of_21_tuc -f accept -a address@pharmacy.arizona.edu -v Add or remove addresses to/from *_these_nonmembers
Usage: ./nonmember_modify.py [options]
Where:
[snip help text]
This script must run from Mailman's bin/ directory.
Non-existent list: Class_of_21_tuc

Entering the list name in all lower case got it to work, which is odd since the script looks like it was supposed to do that.
elif opt in ('-l', '--list'):
arg = arg.lower()
if not Utils.list_exists(arg):
usage(1, _('Non-existent list: %(arg)s'))
lists.append(arg)
On Jun 28, 2021, at 9:39 AM, Bruce Johnson <johnson@pharmacy.arizona.edumailto:johnson@pharmacy.arizona.edu> wrote:
I'm trying to run the nonmembers_modify-py script here https://www.msapiro.net/scripts/non_members
but keep getting the error that the lists are non-existent.
I’m trying to add a non-member accept to a bunch of our Class_of lists:
[root@dhbmailman1 bin]# ./list_lists | grep Class Class_of_21 - Generated from Oracle Class_of_21_phx - Generated from Oracle Class_of_21_tuc - Generated from Oracle Class_of_22 - Generated from Oracle Class_of_22_phx - Generated from Oracle Class_of_22_tuc - Generated from Oracle Class_of_23 - Generated from Oracle Class_of_23_phx - Generated from Oracle Class_of_23_tuc - Generated from Oracle Class_of_24 - Generated from Oracle Class_of_24_phx - Generated from Oracle Class_of_24_tuc - Generated from Oracle
I've tried both ./nonmembers_modify.py -l Class_of_21_tuc -f accept -a address@to_add and ./nonmembers_modify.py -l Class_of_21_tuc@pharmacy.arizona.edumailto:Class_of_21_tuc@pharmacy.arizona.edu -f accept -a address@to_add
And both get the error Non-existent list
[root@dhbmailman1 bin]# ./nonmember_modify.py -l Class_of_21_tuc -f accept -a address@pharmacy.arizona.edumailto:address@pharmacy.arizona.edu -v Add or remove addresses to/from *_these_nonmembers
Usage: ./nonmember_modify.py [options]
Where:
[snip help text]
This script must run from Mailman's bin/ directory.
Non-existent list: Class_of_21_tuc
-- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group
Institutions do not have opinions, merely customs
-- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group
Institutions do not have opinions, merely customs

On 6/28/21 2:56 PM, Bruce Johnson wrote:
Entering the list name in all lower case got it to work, which is odd since the script looks like it was supposed to do that.
elif opt in ('-l', '--list'): arg = arg.lower() if not Utils.list_exists(arg): usage(1, _('Non-existent list: %(arg)s')) lists.append(arg)
The arg = arg.lower()
line was added to
https://www.msapiro.net/scripts/non_members on 2021/04/12. Perhaps the
version you are actually running is older than that.

My copy of that script was downloaded today…it’s an old version of mailman, though 2.1.12. updating’s on my to-do list, but that is a long list :-(
On Jun 28, 2021, at 3:21 PM, Mark Sapiro <mark@msapiro.netmailto:mark@msapiro.net> wrote:
On 6/28/21 2:56 PM, Bruce Johnson wrote: Entering the list name in all lower case got it to work, which is odd since the script looks like it was supposed to do that. elif opt in ('-l', '--list'): arg = arg.lower() if not Utils.list_exists(arg): usage(1, _('Non-existent list: %(arg)s')) lists.append(arg)
The arg = arg.lower()
line was added to https://www.msapiro.net/scripts/non_members on 2021/04/12. Perhaps the version you are actually running is older than that.
-- Mark Sapiro <mark@msapiro.netmailto:mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-Users mailing list -- mailman-users@python.orgmailto:mailman-users@python.org To unsubscribe send an email to mailman-users-leave@python.orgmailto:mailman-users-leave@python.org https://mail.python.org/mailman3/lists/mailman-users.python.org/ Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/ https://mail.python.org/archives/list/mailman-users@python.org/
-- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group
Institutions do not have opinions, merely customs

On 6/28/21 4:36 PM, Bruce Johnson wrote:
My copy of that script was downloaded today…it’s an old version of mailman, though 2.1.12. updating’s on my to-do list, but that is a long list :-(
In that case, I can't explain why it didn't work with mixed case listnames but did with lower case. The Mailman version shouldn't be an issue.
participants (2)
-
Bruce Johnson
-
Mark Sapiro