| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
html_TOC(): We're even more sophisticated when generating the Text
cell. We first look for the .txt.gz file and then the .txt file,
plunking in the link and some extra explanatory text depending on what
we find. If we find nothing, we suppress the entire cell. Also, we
calculate the size (approximately) and give an indication in the cell
text.
ALSO: it is realized that nothing special has to be handled to promote
.txt to .txt.gz when gzip `suddenly appears'. The current algorithm
already handles this. Note there's not much we can do if it suddenly
disappears (since we can't un-gzip it if the module's not available!).
import sys at top of file instead of multiple places where used. also
convert all sys.stderr.write()'s to self.message() so they'll honor
the VERBOSE flag.
|
| |
|
|
| |
see the exception traceback!
|
| |
|
|
|
|
| |
of with the integration of all open's and mkdir's with the
corresponding functions in Utils.
scott
|
| |
|
|
|
|
|
|
|
|
|
| |
from one place to another.
simply take the basedir argument as precedent over the saved state
version of basedir.
I initially considered doing this for the purpose of upgrading list
html archives from cvs sources between b5 and b6. Seems as though
anyone who set up pipermail archiving previously will benefit from the
change, and that it's a good thing for the pipermail module to.
scott
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
zlib, can be imported. However zlib is not a standard Python module
so it may not exist. In that case, use the raw text file. Specific
changes:
Try to import gzip globally. If this fails, set gzip=None for test
down below.
TOC_entry_template, use %(gzip)s to conditionalize
htmlToc(): set the key 'gzip' to '.gz' or '' depending on the value of
gzip
update_dirty_archives(): factor out file names so 1) they don't have
to be recalculated more than once, and 2) so the lines are < 80 chars
wide! Also execute gzip algorithm only if gzip is true, and thus the
gzip module successfully imported.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Import open_ex() from Mailman.Utils and assign it to open in the
module's globals, so this gets picked up before builtin open. Saves
rewriting lots of occurances of open(), but could be confusing when
reading a method. Hmmm...
__version__ is appended to indicate that this is a Mailman-hacked
versio of Pipermail.
Use Mailman.Utils.mkdir() instead of os.mkdir().
All chmod()s are commented out, they are obsolete.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Import open_ex() from Mailman.Utils and assign it to open in the
module's globals, so this gets picked up before builtin open. Saves
rewriting lots of occurances of open(), but could be confusing when
reading a method. Hmmm...
__openIndices(): If the `database' directory does not exist, create it
specifically with mode = 02770. We want o-rx so this directory is not
accessible when the archive is public. But we must have g+wxs or the
competing processes (mail and web) that try to update these files
(when a message is posted, or web approved after being held), can get
to and write the files.
|
| |
|
|
|
|
|
|
|
|
|
| |
Import open_ex() from Mailman.Utils and assign it to open in the
module's globals, so this gets picked up before builtin open. Saves
rewriting lots of occurances of open(), but could be confusing when
reading a method. Hmmm...
Changes to the default values for DIRMODE and FILEMODE.
HyperArchive.add_article(): use mkdir() from Mailman.Utils
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
don't set the mod of the directory to 700. (permissions on the parent
directory are sufficient).
|
| |
|
|
|
|
|
|
| |
code.
Coding style hint: When TQS'ing HTML, please use single quotes instead
of double quotes. It is much more common to find double quotes in
HTML, which screws up font-lock when DQTQS'es are used :-)
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
moving the archiving stuff to a sub package.
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
|