[Mailman-Developers] checkdbs UnicodeError

Daniel Buchmann Daniel.Buchmann at bibsys.no
Thu Feb 6 11:33:46 EST 2003


The patch solved the problem. Thanks! :)

Over to something else:
Is there anyone out there that has written a script to flush (discard)
the entire request db for a specified list?
I need it badly.. ;)


On Thu, 2003-02-06 at 11:25, Tokio Kikuchi wrote:
> Hi,
> 
> Try this patch. It's a coincidence that I am working on it.
> 
> Index: checkdbs
> ===================================================================
> RCS file: /cvsroot/mailman/mailman/cron/checkdbs,v
> retrieving revision 2.17
> diff -u -r2.17 checkdbs
> --- checkdbs    28 Oct 2002 03:43:42 -0000      2.17
> +++ checkdbs    6 Feb 2003 10:21:27 -0000
> @@ -92,6 +92,7 @@
> 
> 
> 
>  def pending_requests(mlist):
> +    lcset = Utils.GetCharSet(mlist.preferred_language)
>      # Must return a byte string
>      pending = []
>      first = 1
> @@ -101,6 +102,8 @@
>              first = 0
>          when, addr, fullname, passwd, digest, lang = mlist.GetRecord(id)
>          if fullname:
> +            if _isunicode(fullname):
> +                fullname = fullname.encode(lcset, 'replace')
>              fullname = ' (%s)' % fullname
>          pending.append('    %s%s %s' % (addr, fullname, time.ctime(when)))
>      first = 1
> 
> =======
> 
> Daniel Buchmann wrote:
> > I was the puzzled receiver of these words this morning:
> > 
> > Traceback (most recent call last):
> >   File "/home/mailman/cron/checkdbs", line 136, in ?
> >     main()
> >   File "/home/mailman/cron/checkdbs", line 80, in main
> >     text += '\n' + pending_requests(mlist)
> >   File "/home/mailman/cron/checkdbs", line 123, in pending_requests
> >     text = NL.join(pending)
> > UnicodeError: ASCII decoding error: ordinal not in range(128)
> > 
> > 
> > Anyone else seen this and know how to fix it?
> > Couldn't find anything about this in the SF bug tracker...
> > 
> > I'm using the Release_2_1-maint CVS branch.
> > 
> > 
> > -Daniel
> > 
> 
> -- 
> Tokio Kikuchi, tkikuchi@ is.kochi-u.ac.jp
> http://weather.is.kochi-u.ac.jp/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/mailman-developers/attachments/20030206/fc397b88/attachment.bin


More information about the Mailman-Developers mailing list