diff options
| author | Barry Warsaw | 2007-09-19 07:28:58 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2007-09-19 07:28:58 -0400 |
| commit | 4c517789fa8b29d2a23791e6f390d9f1173c3125 (patch) | |
| tree | 9b5c1ed27416cbec12665a1cea5206336d72c039 /Mailman/Handlers/ToDigest.py | |
| parent | 39c87b16da60a5274bfc7494d0a121b3162b56fb (diff) | |
| download | mailman-4c517789fa8b29d2a23791e6f390d9f1173c3125.tar.gz mailman-4c517789fa8b29d2a23791e6f390d9f1173c3125.tar.zst mailman-4c517789fa8b29d2a23791e6f390d9f1173c3125.zip | |
Diffstat (limited to 'Mailman/Handlers/ToDigest.py')
| -rw-r--r-- | Mailman/Handlers/ToDigest.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Mailman/Handlers/ToDigest.py b/Mailman/Handlers/ToDigest.py index ece052f14..5fd08852f 100644 --- a/Mailman/Handlers/ToDigest.py +++ b/Mailman/Handlers/ToDigest.py @@ -25,6 +25,8 @@ # directory and the DigestRunner will craft the MIME, rfc1153, and # (eventually) URL-subject linked digests from the mbox. +from __future__ import with_statement + import os import re import copy @@ -129,12 +131,8 @@ def send_digests(mlist, mboxfp): mlist.digest_last_sent_at = time.time() # Wrapper around actually digest crafter to set up the language context # properly. All digests are translated to the list's preferred language. - otranslation = i18n.get_translation() - i18n.set_language(mlist.preferred_language) - try: + with i18n.using_language(mlist.preferred_language): send_i18n_digests(mlist, mboxfp) - finally: - i18n.set_translation(otranslation) |
