aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
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