summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2001-03-26 07:26:35 +0000
committerbwarsaw2001-03-26 07:26:35 +0000
commit2c6769df10b0afae01e21f0240fb922ad603325d (patch)
tree2ecc54c277835de96c33f800ab7d0b54a44e937c
parentc7193d04490566919fb6487e3ac0335355c75dae (diff)
downloadmailman-2c6769df10b0afae01e21f0240fb922ad603325d.tar.gz
mailman-2c6769df10b0afae01e21f0240fb922ad603325d.tar.zst
mailman-2c6769df10b0afae01e21f0240fb922ad603325d.zip
-rwxr-xr-xbin/update17
1 files changed, 16 insertions, 1 deletions
diff --git a/bin/update b/bin/update
index 584917520..353a011a3 100755
--- a/bin/update
+++ b/bin/update
@@ -1,6 +1,6 @@
#! /usr/bin/env python
#
-# Copyright (C) 1998,1999,2000 by the Free Software Foundation, Inc.
+# Copyright (C) 1998,1999,2000,2001 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -345,6 +345,21 @@ def main():
os.unlink(wmfile)
print '- usenet watermarks updated and gate_watermarks removed'
#
+ # In Mailman 2.1, the pending database format and file name has changed.
+ #
+ oldpendingfile = os.path.join(mm_cfg.DATA_DIR, 'pending_subscriptions.db')
+ try:
+ fp = open(oldpendingfile)
+ except IOError, e:
+ if e.errno <> errno.ENOENT: raise
+ else:
+ print 'Updating old pending_subscriptions.db database'
+ from Mailman import Pending
+ db = marshal.load(fp)
+ Pending._update(db)
+ fp.close()
+ os.unlink(oldpendingfile)
+ #
# This warning was necessary for the upgrade from 1.0b9 to 1.0b10.
# There's no good way of figuring this out for releases prior to 2.0beta2
# :(