From f2396437f76d97fefedb55179390851c4fd05592 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Fri, 31 Jul 2009 15:37:29 -0700 Subject: Backported several bug fixes from the 2.2 branch. --- bin/update | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'bin') 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 -- cgit v1.2.3