diff options
| author | bwarsaw | 2002-11-12 21:05:38 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-11-12 21:05:38 +0000 |
| commit | acd3a87f9986095166c9a1e843030523510f2c5e (patch) | |
| tree | f6720744674c6a07437c7633d1a934955fcf9b50 | |
| parent | 7b0df662ca9bdfcf273220cec285f50a7f7983ee (diff) | |
| download | mailman-acd3a87f9986095166c9a1e843030523510f2c5e.tar.gz mailman-acd3a87f9986095166c9a1e843030523510f2c5e.tar.zst mailman-acd3a87f9986095166c9a1e843030523510f2c5e.zip | |
ArchiveMail(): Get rid of the try/bare-except wrapper around the
mailbox processing. It's good enough for the caller of this code to
do the exception handling.
| -rw-r--r-- | Mailman/Archiver/Archiver.py | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/Mailman/Archiver/Archiver.py b/Mailman/Archiver/Archiver.py index 512082320..903031cd2 100644 --- a/Mailman/Archiver/Archiver.py +++ b/Mailman/Archiver/Archiver.py @@ -191,29 +191,21 @@ class Archiver: if mm_cfg.ARCHIVE_TO_MBOX == 1: # Archive to mbox only. return - # From this point on, we're doing all the expensive archiving work. - # If anything goes wrong here, we will simply log this and let the - # normal delivery mechanism continue. The archiver is too f*cked up - # anyway, and at the very least we've got the mbox to regenerate - # from. - try: - txt = str(msg) - # should we use the internal or external archiver? - private_p = self.archive_private - if mm_cfg.PUBLIC_EXTERNAL_ARCHIVER and not private_p: - self.ExternalArchive(mm_cfg.PUBLIC_EXTERNAL_ARCHIVER, txt) - elif mm_cfg.PRIVATE_EXTERNAL_ARCHIVER and private_p: - self.ExternalArchive(mm_cfg.PRIVATE_EXTERNAL_ARCHIVER, txt) - else: - # use the internal archiver - f = StringIO(txt) - import HyperArch - h = HyperArch.HyperArchive(self) - h.processUnixMailbox(f) - h.close() - f.close() - except: - traceback.print_exc() + txt = str(msg) + # should we use the internal or external archiver? + private_p = self.archive_private + if mm_cfg.PUBLIC_EXTERNAL_ARCHIVER and not private_p: + self.ExternalArchive(mm_cfg.PUBLIC_EXTERNAL_ARCHIVER, txt) + elif mm_cfg.PRIVATE_EXTERNAL_ARCHIVER and private_p: + self.ExternalArchive(mm_cfg.PRIVATE_EXTERNAL_ARCHIVER, txt) + else: + # use the internal archiver + f = StringIO(txt) + import HyperArch + h = HyperArch.HyperArchive(self) + h.processUnixMailbox(f) + h.close() + f.close() # # called from MailList.MailList.Save() |
