[Mailman-Users] how to test template customization
Mark Sapiro
mark at msapiro.net
Tue Aug 20 19:55:08 EDT 2019
On 8/20/19 4:14 PM, Russell Clemings wrote:
> This appears to do what I want -- removes everything except the names of
> the list subscriptions:
>
> diff --git a/mailpasswds b/mailpasswds
> index f194dc6..5f91f34 100644
> --- a/mailpasswds
> +++ b/mailpasswds
> @@ -151,19 +151,8 @@ def main():
> continue
> # Group by the lower-cased address, since Mailman always
> # treates person at dom.ain the same as PERSON at dom.ain.
> - try:
> - password = mlist.getMemberPassword(member)
> - except Errors.NotAMemberError:
> - # Here's a member with no passwords, which I think was
> - # possible in older versions of Mailman. Log this and
> - # move on.
> - syslog('error', 'password-less member %s for list %s',
> - member, mlist.internal_name())
> - continue
> -
> -
> - optionsurl = mlist.GetOptionsURL(member)
> -
> + password = ''
> + optionsurl = ''
> lang = mlist.getMemberLanguage(member)
> info = (listaddr, password, optionsurl, lang)
> userinfo.setdefault(member, []).append(info)
> @@ -221,8 +210,7 @@ def main():
> i18n.set_language(poplang)
> # Craft table header after language was set
> header = '%-40s %-10s\n%-40s %-10s' % (
> - _('List'), _('Password // URL'), '----', '--------')
> -
> + _('Your subscriptions'), _(''), '----', ' ')
> header = tounicode(header, enc)
> # Add the table to the end so it doesn't get wrapped/filled
> text += (header + '\n' + NL.join(table))
There are multiple ways to do this, but the above is as good as any.
--
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