[Mailman-Users] /home/mailman/cron/senddigest yields ValueError
Dan Mick
Dan.Mick at west.sun.com
Thu Nov 16 00:51:07 CET 2000
> Thanks for the reply. Below are two follow-up questions -
Sorry for the delay in answering.
> * Dan Mick <Dan.Mick at west.sun.com> [001113 21:26]:
> > Looks to me like your digest_header value has a "percent-newline" ("%\n")
> > sequence in it; the % operator tried to substitute things from
TemplateRefs() into
> > the digest_header, and failed with the message "unsupported format
character.." and
> > things that indicate "newline".
> >
> > Rethink your digest text wrt percent signs.
>
>
> I know nothing about mailman's interworkings; are my assumptions (below)
> correct?
>
> - i assume there is no global default value for "digest_headers";
mm_cfg.DEFAULT_DIGEST_HEADER, which you set in mm_cfg.py if you wish
(see comments in Defaults.py)
> - i assume the only supplied interface to a list's digest_headers is via
> the web admin interface;
Well, you can always set anything about a list with bin/withlist directly,
or you could have set the default from mm_cfg, but the current value
should always show *up* in the web interface.
> - i assume the value of digest_headers is stored in the lists's
> config.db data file.
Yes, like everything about the list. It's an attribute of the
MailList object. See, for instance, bin/dumpdb of config.db
for exhaustive info.
> After checking the value of all my lists digest_headers, I found one
> that looked suspicious. It had a format like this:
> "Bla bla bla, etc.
> %(info)
> _____________________________________"
>
> Does the "%(info)" token need to be followed by the letter 's'?
Yes. See http://www.python.org/doc/current/lib/typesseq-strings.html,
which is referred to in the Details for digest_header, digest_footer,
and all the other "interpolated strings". It's basically %s, but
with a dictionary key; %(info)s means "get the dictionary item with
key "info" and substitute it as a string (%s)".
More information about the Mailman-Users
mailing list