[Mailman-Developers] 2.0beta3 update gate_watermarks->config.db for non-existent list

Jim Tittsler jwt@dskk.co.jp
Fri, 14 Apr 2000 15:13:05 +0900


--+QahgC5+KEYLbs62
Content-Type: text/plain; charset=us-ascii

I just tried to update a system from 2.0b1 to 2.0b3 (CVS @ ~0300UTC) and
discovered a problem with the section of 'update' that copies the
gate_watermarks file into the config.db files.  gate_watermarks can contain
watermarks for lists that no longer exist.  That results in:

Updating Usenet watermarks
Traceback (innermost last):
  File "bin/update", line 293, in ?
    mlist = MailList.MailList(listname)
  File "/home/mailman/Mailman/MailList.py", line 70, in __init__
    self.Load()
  File "/home/mailman/Mailman/MailList.py", line 880, in Load
     raise Errors.MMUnknownListError, e
Mailman.Errors.MMUnknownListError: [Errno 2] No such file or directory:
'/home/mailman/lists/tpc.test3/config.db'

There are lots of ways to fix it... the one I used is attached.

-- 
Jim Tittsler, Tokyo
Python Starship     http://starship.python.net/crew/jwt/


--+QahgC5+KEYLbs62
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="update.diff"

*** update.orig	Fri Apr 14 14:37:40 2000
--- update	Fri Apr 14 15:11:06 2000
***************
*** 291,294 ****
--- 291,297 ----
          fp.close()
          for listname in d.keys():
+             # if a watermark for a list that no longer exists, skip it
+             if listname not in lists:
+                 continue
              mlist = MailList.MailList(listname)
              # Pre 1.0b7 stored 0 in the gate_watermarks file to indicate that

--+QahgC5+KEYLbs62--