On 07/11/2016 08:35 AM, Matthew Needham wrote:
> 
> Thanks! However, I'm seeing "ValueError: zero length field name in format" 
> whether I run it for all lists or one:
> 
> [root@lw4 mailman]# ./bin/withlist -a -r list_etc
> Importing list_etc...
> Running list_etc.list_etc()...
> Loading list hdf5lib_lists.hdfgroup.org (unlocked)
> Traceback (most recent call last):
>   File "./bin/withlist", line 299, in <module>
>     main()
>   File "./bin/withlist", line 274, in main
>     r = [do_list(listname, args, func) for listname in Utils.list_names()]
>   File "./bin/withlist", line 202, in do_list
>     return func(m, *args)
>   File "/usr/local/cpanel/3rdparty/mailman/bin/list_etc.py", line 29, in 
> list_etc
>     print('List:{}'.format(mlist.real_name))
> ValueError: zero length field name in format
> Finalizing


The issue is this "'List:{}'.format(mlist.real_name)" requires Python
2.7. With Python 2.6 it needs to be 'List:{0}'.format(mlist.real_name).
For older versions, there is no format string method, so string
interpolation as in 'List:%s' % mlist.real_name needs to be used.

I have updated the scripts at
<https://www.msapiro.net/scripts/list_etc.py> and the mirror at
<https://fog.ccsf.edu/~msapiro/scripts/list_etc.py> to work with older
Python versions.

-- 
Mark Sapiro <m...@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.org
https://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: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to