------------------------------------------------------------
revno: 1013
committer: Mark Sapiro <[EMAIL PROTECTED]>
branch nick: 2.2
timestamp: Fri 2008-10-17 15:35:00 -0700
message:
Changed bin/arch to attempt to open the mbox before wiping the old archive.
Launchpad bug #280418.
modified:
bin/arch
=== modified file 'bin/arch'
--- a/bin/arch 2005-08-27 01:40:17 +0000
+++ b/bin/arch 2008-10-17 22:35:00 +0000
@@ -1,6 +1,6 @@
#! @PYTHON@
#
-# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2008 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
@@ -161,6 +161,11 @@
# set the lock lifetime to 3 hours. XXX is this reasonable???
lock = LockFile(lockfile, lifetime=3*60*60)
lock.lock()
+ # Try to open mbox before wiping old archive.
+ try:
+ fp = open(mbox)
+ except IOError, msg:
+ usage(3, _('Cannot open mbox file %(mbox)s: %(msg)s'))
# Maybe wipe the old archives
if wipe:
if mlist.scrub_nondigest:
@@ -177,10 +182,6 @@
shutil.rmtree(mlist.archive_dir())
if mlist.scrub_nondigest and saved:
os.renames(savedir, atchdir)
- try:
- fp = open(mbox)
- except IOError, msg:
- usage(3, _('Cannot open mbox file %(mbox)s: %(msg)s'))
archiver = HyperArchive(mlist)
archiver.VERBOSE = verbose
--
Active development version (web u/i update)
https://code.launchpad.net/~mailman-coders/mailman/2.2
You are receiving this branch notification because you are subscribed to it.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org