[Mailman-Developers] nightly_gzip not compressing weeklys?

Barry A. Warsaw bwarsaw@cnri.reston.va.us
Thu, 27 Apr 2000 16:34:37 -0400 (EDT)


>>>>> "RJ" == Ron Jarrell <jarrell@vt.edu> writes:

    RJ> Does nightly_gzip only handle monthlies?  It's not clear from
    RJ> the code (and my knowledge of python :-)), but it sure looks
    RJ> like it's only compressing monthlys.

Back in February, Thomas Wouters suggested this patch.  It seems to
work for me so I'll go ahead and commit it.

-Barry

Index: nightly_gzip
===================================================================
RCS file: /projects/cvsroot/mailman/cron/nightly_gzip,v
retrieving revision 1.5
diff -c -r1.5 nightly_gzip
*** nightly_gzip	2000/03/21 06:26:25	1.5
--- nightly_gzip	2000/04/27 20:26:28
***************
*** 111,121 ****
              if mlist.last_post_time > 0:
                  print 'List', name, 'has a bogus archive_directory:', dir
              continue
          files = []
          for f in allfiles:
!             try:
!                 time.strptime(f, '%Y-%B.txt')
!             except ValueError:
                  continue
              # stat both the .txt and .txt.gz files and append them only if 
              # the former is newer than the latter.
--- 111,121 ----
              if mlist.last_post_time > 0:
                  print 'List', name, 'has a bogus archive_directory:', dir
              continue
+         if VERBOSE:
+             print 'Processing list:', name
          files = []
          for f in allfiles:
!             if f[-4:] <> '.txt':
                  continue
              # stat both the .txt and .txt.gz files and append them only if 
              # the former is newer than the latter.