------------------------------------------------------------
revno: 6648
committer: Mark Sapiro <[EMAIL PROTECTED]>
branch nick: 3.0
timestamp: Fri 2008-10-17 15:36:33 -0700
message:
  Changed bin/arch to attempt to open the mbox before wiping the old archive.
  Launchpad bug #280418.
modified:
  mailman/bin/arch.py

=== modified file 'mailman/bin/arch.py'
--- a/mailman/bin/arch.py       2008-10-17 17:58:18 +0000
+++ b/mailman/bin/arch.py       2008-10-17 22:36:33 +0000
@@ -115,6 +115,15 @@
     # XXX processUnixMailbox() should refresh the lock.
     lock_path = os.path.join(mlist.data_path, '.archiver.lck')
     with Lock(lock_path, lifetime=int(hours(3))):
+        # Try to open mbox before wiping old archive.
+        try:
+            fp = open(mbox)
+        except IOError, e:
+            if e.errno == errno.ENOENT:
+                print >> sys.stderr, _('Cannot open mbox file: $mbox')
+            else:
+                print >> sys.stderr, e
+            sys.exit(1)
         # Maybe wipe the old archives
         if opts.wipe:
             if mlist.scrub_nondigest:
@@ -132,14 +141,6 @@
             shutil.rmtree(mlist.archive_dir())
             if mlist.scrub_nondigest and saved:
                 os.renames(savedir, atchdir)
-        try:
-            fp = open(mbox)
-        except IOError, e:
-            if e.errno == errno.ENOENT:
-                print >> sys.stderr, _('Cannot open mbox file: $mbox')
-            else:
-                print >> sys.stderr, e
-            sys.exit(1)
 
         archiver = HyperArchive(mlist)
         archiver.VERBOSE = opts.verbose



--
Primary development focus
https://code.launchpad.net/~mailman-coders/mailman/3.0

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

Reply via email to