diff options
Diffstat (limited to 'Mailman/Archiver.py')
| -rw-r--r-- | Mailman/Archiver.py | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/Mailman/Archiver.py b/Mailman/Archiver.py index c3f1009b8..f15acfb35 100644 --- a/Mailman/Archiver.py +++ b/Mailman/Archiver.py @@ -119,23 +119,25 @@ class Archiver: # if os.fork(): return - try: - from cStringIO import StringIO - except ImportError: - from StringIO import StringIO - txt = msg.unixfrom - for h in msg.headers: - txt = txt + h - if msg.body[0] != '\n': - txt = txt + "\n" - txt = txt + msg.body - f = StringIO(txt) - import HyperArch - h = HyperArch.HyperArchive(self) - h.processUnixMailbox(f, HyperArch.Article) - h.close() - f.close() - os._exit(0) + try: + try: + from cStringIO import StringIO + except ImportError: + from StringIO import StringIO + txt = msg.unixfrom + for h in msg.headers: + txt = txt + h + if msg.body[0] != '\n': + txt = txt + "\n" + txt = txt + msg.body + f = StringIO(txt) + import HyperArch + h = HyperArch.HyperArchive(self) + h.processUnixMailbox(f, HyperArch.Article) + h.close() + f.close() + finally: + os._exit(0) def ArchiveFileName(self): |
