diff options
author | David Planella <david.planella@gmail.com> | 2008-11-22 21:32:49 +0100 |
---|---|---|
committer | David Planella <david.planella@gmail.com> | 2008-11-22 21:32:49 +0100 |
commit | 85aae3995be31a5f10cf65235f15038dbdcdb261 (patch) | |
tree | 38d0ed32dee807f463656fcb98cf579ce952fc6a /bin/arch | |
parent | 9476341ddf99f5a5138c2dc81c84a797b2c81579 (diff) | |
parent | f0d392172bb2400927948004d2dc66c264ca2aa5 (diff) | |
download | mailman2-85aae3995be31a5f10cf65235f15038dbdcdb261.tar.gz mailman2-85aae3995be31a5f10cf65235f15038dbdcdb261.tar.xz mailman2-85aae3995be31a5f10cf65235f15038dbdcdb261.zip |
Merged from upstream (lp:mailman/stable)
Upgraded the repository format with 'bzr upgrade'
Diffstat (limited to 'bin/arch')
-rw-r--r-- | bin/arch | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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 @@ def main(): # 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 @@ def main(): 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 |