aboutsummaryrefslogtreecommitdiffstats
path: root/bin/update
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2009-07-31 15:37:29 -0700
committerMark Sapiro <mark@msapiro.net>2009-07-31 15:37:29 -0700
commitf2396437f76d97fefedb55179390851c4fd05592 (patch)
tree3e30e9be19ef4cabb21b9bf08d541b82e70c7269 /bin/update
parent0f74db6fb0ae5a4fcdfaaf1976d196efc01ab0b0 (diff)
downloadmailman2-f2396437f76d97fefedb55179390851c4fd05592.tar.gz
mailman2-f2396437f76d97fefedb55179390851c4fd05592.tar.xz
mailman2-f2396437f76d97fefedb55179390851c4fd05592.zip
Backported several bug fixes from the 2.2 branch.
Diffstat (limited to '')
-rwxr-xr-xbin/update23
1 files changed, 13 insertions, 10 deletions
diff --git a/bin/update b/bin/update
index e36c1c40..d74cae92 100755
--- a/bin/update
+++ b/bin/update
@@ -1,6 +1,6 @@
#! @PYTHON@
#
-# Copyright (C) 1998-2008 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2009 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
@@ -14,7 +14,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
"""Perform all necessary upgrades.
@@ -126,8 +127,8 @@ def move_language_templates(mlist):
try:
fp = open(os.path.join(mm_cfg.TEMPLATE_DIR, gtemplate))
except IOError, e:
- if e.errno <> errno.ENOENT: raise
- # No global template
+ if e.errno not in (errno.ENOENT, errno.EISDIR): raise
+ # No global template or maybe a VCS directory
continue
gcksum = Utils.md5_new(fp.read()).digest()
@@ -298,9 +299,7 @@ script.
%(newname)s""")
else:
# directory
- print _("""\
- looks like you have a really recent CVS installation...
- you're either one brave soul, or you already ran me""")
+ print _('Nothing to do.')
#
@@ -321,9 +320,7 @@ script.
to
%(newname)s""")
else: # directory
- print _("""\
- looks like you have a really recent CVS installation...
- you're either one brave soul, or you already ran me""")
+ print _('Nothing to do.')
#
# move the html archives there
@@ -510,6 +507,12 @@ def dequeue(filebase):
try:
msgfp = open(pckfile)
msg = cPickle.load(msgfp)
+ if not data:
+ # There was no .db file. Is this a post 2.1.5 .pck?
+ try:
+ data = cPickle.load(msgfp)
+ except EOFError:
+ pass
os.unlink(pckfile)
except EnvironmentError, e:
if e.errno <> errno.ENOENT: raise