| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
| |
in a try/finally so we guarantee we de-munge the header.
ArchiveMail(): Undo the previous change (test for mlist.archive).
This is redundant given the test in ToArchive.py.
|
| |
|
|
|
| |
method, use their mapping type interface instead.
ArchiveMail(): Don't do any archiving unless self.archive is true.
|
| |
|
|
|
|
|
|
| |
Archiver.__archive_to_mbox(): Since Python 1.5.2 is now required, we
can get rid of the Utils.reraise() hack.
Also, use import statements which are more consistent with the rest of
Mailman.
|
| | |
|
| |
|
|
| |
for this before indexing msg.body[0]
|
| |
|
|
|
|
| |
use the lower cased list name (i.e. the internal name) as the
%(listname)s expansion; log a message when the external archivers
exits with a non-zero status.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
PUBLIC_EXTERNAL_ARCHIVER is true, the variable contains a shell
command string for os.popen() to invoke the external archiver.
Similar for PRIVATE_EXTERNAL_ARCHIVER and private archiving.
Patch submitted by Paul Hebble <hebble@ncsa.uiuc.edu>, modified by
myself (I couldn't resist!)
|
| |
|
|
|
|
| |
to run (thus breaking the lock). Two changes: crank the lock lifetime
up to 5 minutes, and catch any possible NotLockedErrors that might
occur.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
should considerably help the performance of the archiver.
Specifically:
ArchiveMail(): Create a lock file (and lock it), just after the fork.
Jeremy observes that there is a race condition when many posts show up
in a short amount of time. By creating a lock file we make sure that
the separate archiver processes won't clobber each other.
Use the new LockFile module.
Move the (c)StringIO import to the top of the file.
|
| |
|
|
|
|
|
| |
single message, we must quote any lines beginning with "From " --
the message will be interpreted by the general
HyperArch.HyperArchive.processUnixMailbox() as a (possibly
multi-message) mbox file on it's way into the archive.
|
| |
|
|
| |
script.
|
| | |
|
| |
|
|
|
| |
added trailing '/' to public archive url (it always points to a directory).
scott
|
| |
|
|
| |
see the exception traceback!
|
| |
|
|
|
|
|
| |
bin/arch: script to integrate an mbox intove html archives. I'm hoping
to extend the functionality of this script one day, hence the general
name.
scott
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
occurring within the child process. We need a 'finally: os._exit()'
to ensure that we don't return twice to parent processes that happen
to handle exceptions (like the post script does), but we also need to
do something to report the exception, since the 'finally: os._exit()'
will prevent getting back to the top level, where uncaught exceptions
would be printed to stdout. The answer is to wrap a 'try...finally'
around a 'try...except' that uses traceback.print_exc() to print the
traceback to stderr. Now we won't get mutiple returns from the script
in case of exceptions, but the exception will be reported.
.ArchiveMail(), .CheckHTMLArchiveDir(): Respect new -1 value for
ARCHIVE_TO_MBOX, meaning disable all archiving (for those who, eg,
don't want to expend the disk space - or those who can't get it to
work without errors;-). Yes, the '-1' value is bogus - but the
consolidation of html vs mbox saving using a single var, and without
an option to disable completely, is more bogus:-) I'll suggest an
alternative in my checkin of Defaults.py.in.
.__archive_to_mbox(): the message being logged in the IOError
exception case had a bad index, causing another exception.
|
| |
|
|
|
|
|
|
|
|
|
| |
Mailman.Utils.mkdir() which are now 02775 by default.
Archiver.__archive_file(): Use Mailman.Utils.open_ex() to open the
mailbox file.
Archiver.__archive_to_mbox(): In the except IOError clause, reraise
the exception instead of just logging the error message. Turns out to
be useful for debugging.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
handling. See the comment embedded in InitVars() for details.
makelink(), breaklink(): Two new helper functions
Archiver.archive_dir(): Public interface to other modules for getting
the archive directory. Use this instead of accessing the attribute
directly. (In general a good coding style to adhere to anyway).
Archiver.ArchiveFile() => Archiver.__archive_file() since no other
module uses this method.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
problematic in a forked image of the list - both the parent and the
child have the lock, and they're both going to use it!
.ArchiveMail(): Do an os._exit() instead of a return in the case where
ARCHIVE_TO_MBOX is 1 (mbox only). Otherwise we were returning to a
second version of the caller, and havoc ensued...-)
There is still a problem with not having the final os._exit() ensured
as part of a "try:...finally:" clause, which actually causes
redundancy in the operation of the post script. The problem is:
- the post script, for example, calls ArchiveMail() within the try
section of a try...finally
- ArchiveMail() may encounter an exception before it hits the os._exit()
- and thus, the stack frame will be popped back to post(), hitting
the finally which gets executed.
I'd like to just put the ArchiveMail()'s os._exit() in a finally
clause, to make sure it always happens, but for some reason that is
preventing tracebacks from making their way to the error log. We need
to determine why that's happening, and do the right thing, otherwise
we *are* getting multiple returns from routine when an exception
occurs.
|
| |
|
|
|
|
|
|
|
| |
import Mailman.<module>
<module> = Mailman.<module>
to
from Mailman import <module>
I didn't realize you could do this, thanx for letting me know, Barry
scott
|
|
|
package.
Details:
changed Makefile to add the sub package as a directory to make
recursively in
changed configure to make the replacements to
Mailman/Archiver/Makefile.in
changed Mailman/Makefile.in to add Archiver as a sub package
moved Mailman/Archiver.py to Mailman/Archiver/Archiver.py and
Mailman/Hyper* to Mailman/Archiver
Mailman/pipermail.py to Mailman/Archiver/
created Mailman/Archiver/__init__.py to do a "from Archiver import *"
in order to make it's interface identical to previously.
import change: changed imports to import Mailman.<module> from import
<module> in order to accomodate the package import semantics, also
localized <module> by calling <module> = Mailman.<module>. see diffs
for details if this sounds confusing, it's not. this change was
applied to all of the moved files except pipermail, which didn't need
it.
did a basic new installation test to make sure all the
Makefile/configure changes took place atleast basically correctly.
scott
|