[Mailman-Users] EXTERNAL_ARCHIVER problem

Allen Bolderoff allen at gist.net.au
Mon Nov 29 07:50:34 CET 1999


this sort of works, except it seems that the piping does not work.

I have to go out, but will be back in about 4 hours and try it better,


> >    mm_cfg.ARCHIVE_TO_MBOX is 1 or 2
> >    mm_cfg.PUBLIC_EXTERNAL_ARCHIVER is declared
> > 
> > Apparently there's something wrong with the expansion of $listname
> > in Archiver.py.  
> 
> I'm guessing that it's something to do with Python 1.5.1, but it's just
> a thought.  Here's a patch that uses the icky regsub, but it has one
> up on the current code...  It works.  :)
> 
> Use ${LISTNAME} for macro expansion.  This is against Mailman-1.1.
> 
> Chris
> 
> --- Mailman/Archiver/Archiver.py    Sun Nov 28 23:52:32 1999
> ***************
> *** 29,34 ****
> --- 29,35 ----
>   import sys, os, string
>   import errno
>   import traceback
> + import regsub
>   
>   try:
>       from cStringIO import StringIO
> ***************
> *** 183,190 ****
>               post.SetHeader('Date', olddate)
>   
>       def ExternalArchive(self, ar, txt):
> !         d = SafeDict({'listname': self.real_name})
> !         cmd = ar % d
>           extarch = os.popen(cmd, 'w')
>           extarch.write(txt)
>           extarch.close()
> --- 184,190 ----
>               post.SetHeader('Date', olddate)
>   
>       def ExternalArchive(self, ar, txt):
> !         cmd = regsub.gsub('\${LISTNAME}', self.real_name, ar)
>           extarch = os.popen(cmd, 'w')
>           extarch.write(txt)
>           extarch.close()
> 

-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Allen Bolderoff <allen at gist.net.au>
LNC - Redhat and Linux, help and commentary http://linux.netnerve.com
CTPC - Caffeine - get it here: http://www.coffee-tea-pots-cups.com/
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
GPG fingerprint = CBB0 8626 702C 3D01 B5AD  A54A DC2C 93B7 3E4B 6472
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++






More information about the Mailman-Users mailing list