diff options
| author | Barry Warsaw | 2008-09-28 15:55:09 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2008-09-28 15:55:09 -0400 |
| commit | 39f1395cd1640fd639a2c824611fa1ad9f09a929 (patch) | |
| tree | c3d0492dce4f2e912aea3aa616ce9a2881379197 /mailman/Archiver/HyperArch.py | |
| parent | 512145d93efc318adc0250dd53f4a53d8738f679 (diff) | |
| download | mailman-39f1395cd1640fd639a2c824611fa1ad9f09a929.tar.gz mailman-39f1395cd1640fd639a2c824611fa1ad9f09a929.tar.zst mailman-39f1395cd1640fd639a2c824611fa1ad9f09a929.zip | |
Diffstat (limited to 'mailman/Archiver/HyperArch.py')
| -rw-r--r-- | mailman/Archiver/HyperArch.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mailman/Archiver/HyperArch.py b/mailman/Archiver/HyperArch.py index 52a0bfa50..48e6d5835 100644 --- a/mailman/Archiver/HyperArch.py +++ b/mailman/Archiver/HyperArch.py @@ -42,13 +42,13 @@ from email.Charset import Charset from email.Errors import HeaderParseError from email.Header import decode_header, make_header from locknix.lockfile import Lock +from string import Template from mailman import Utils from mailman import i18n from mailman.Archiver import HyperDatabase from mailman.Archiver import pipermail from mailman.Mailbox import ArchiverMailbox -from mailman.SafeDict import SafeDict from mailman.configuration import config log = logging.getLogger('mailman.error') @@ -199,15 +199,14 @@ def quick_maketext(templatefile, dict=None, lang=None, mlist=None): text = template if dict is not None: try: - sdict = SafeDict(dict) try: - text = sdict.interpolate(template) + text = Template(template).safe_substitute(**dict) except UnicodeError: # Try again after coercing the template to unicode utemplate = unicode(template, Utils.GetCharSet(lang), 'replace') - text = sdict.interpolate(utemplate) + text = Template(utemplate).safe_substitute(**dict) except (TypeError, ValueError): # The template is really screwed up pass |
