summaryrefslogtreecommitdiff
path: root/Mailman/Archiver.py
diff options
context:
space:
mode:
authorklm1998-10-19 16:10:53 +0000
committerklm1998-10-19 16:10:53 +0000
commit0e50521fce2eb06dbfc35ca69bfda5ef6519f8b8 (patch)
treef2bf574dcaff579d9501473d619c99440a780ba0 /Mailman/Archiver.py
parentaa9d63309dd912f07ffeb493630af0ceddc0336e (diff)
downloadmailman-0e50521fce2eb06dbfc35ca69bfda5ef6519f8b8.tar.gz
mailman-0e50521fce2eb06dbfc35ca69bfda5ef6519f8b8.tar.zst
mailman-0e50521fce2eb06dbfc35ca69bfda5ef6519f8b8.zip
Diffstat (limited to 'Mailman/Archiver.py')
-rw-r--r--Mailman/Archiver.py36
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):