summaryrefslogtreecommitdiff
path: root/Mailman/Archiver/HyperArch.py
diff options
context:
space:
mode:
authorbwarsaw2002-12-05 06:04:59 +0000
committerbwarsaw2002-12-05 06:04:59 +0000
commitf9d97fdfeae0501910679504826b303d8c588535 (patch)
tree1e72358039ff84a6a2095082c44442fe265123db /Mailman/Archiver/HyperArch.py
parent34b7de105b1339cdfb63a038e01720c0b2c9bb0c (diff)
downloadmailman-f9d97fdfeae0501910679504826b303d8c588535.tar.gz
mailman-f9d97fdfeae0501910679504826b303d8c588535.tar.zst
mailman-f9d97fdfeae0501910679504826b303d8c588535.zip
update_article(): Reword the messages for proper i18n style. Closes
SF bug #648604.
Diffstat (limited to 'Mailman/Archiver/HyperArch.py')
-rw-r--r--Mailman/Archiver/HyperArch.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/Mailman/Archiver/HyperArch.py b/Mailman/Archiver/HyperArch.py
index 9df36c88e..4a0a381c6 100644
--- a/Mailman/Archiver/HyperArch.py
+++ b/Mailman/Archiver/HyperArch.py
@@ -27,6 +27,7 @@
import sys
import re
+import errno
import urllib
import time
import os
@@ -1228,19 +1229,21 @@ class HyperArchive(pipermail.T):
return article
def update_article(self, arcdir, article, prev, next):
- self.message(_('Updating HTML for article ') + str(article.sequence))
+ seq = article.sequence
+ filename = os.path.join(arcdir, article.filename)
+ self.message(_('Updating HTML for article %(seq)s'))
try:
- f = open(os.path.join(arcdir, article.filename))
+ f = open(filename)
article.loadbody_fromHTML(f)
f.close()
- except IOError:
- self.message(_("article file %s is missing!")
- % os.path.join(arcdir, article.filename))
+ except IOError, e:
+ if e.errno <> errno.ENOENT: raise
+ self.message(_('article file %(filename)s is missing!'))
article.prev = prev
article.next = next
omask = os.umask(002)
try:
- f = open(os.path.join(arcdir, article.filename), 'w')
+ f = open(filename, 'w')
finally:
os.umask(omask)
f.write(article.as_html())