summaryrefslogtreecommitdiff
path: root/src/mailman/bin/checkdbs.py
diff options
context:
space:
mode:
authorBarry Warsaw2009-02-12 20:36:21 -0500
committerBarry Warsaw2009-02-12 20:36:21 -0500
commit62f4c909f90535986614a411db982bdcccaec3a1 (patch)
tree2fe5dd3316cea73f63cb34230d848758050eade3 /src/mailman/bin/checkdbs.py
parent2b28803e7165e91d812cd9e9e3804a6d9bdce8a1 (diff)
downloadmailman-62f4c909f90535986614a411db982bdcccaec3a1.tar.gz
mailman-62f4c909f90535986614a411db982bdcccaec3a1.tar.zst
mailman-62f4c909f90535986614a411db982bdcccaec3a1.zip
Diffstat (limited to 'src/mailman/bin/checkdbs.py')
-rw-r--r--src/mailman/bin/checkdbs.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mailman/bin/checkdbs.py b/src/mailman/bin/checkdbs.py
index 2ce08aab7..10d34aa22 100644
--- a/src/mailman/bin/checkdbs.py
+++ b/src/mailman/bin/checkdbs.py
@@ -22,11 +22,11 @@ import optparse
from email.Charset import Charset
from mailman import MailList
-from mailman import Message
from mailman import Utils
from mailman import i18n
from mailman.app.requests import handle_request
from mailman.configuration import config
+from mailman.email.message import UserNotification
from mailman.version import MAILMAN_VERSION
_ = i18n._
@@ -59,7 +59,7 @@ Check for pending admin requests and mail the list owners if necessary."""))
def pending_requests(mlist):
# Must return a byte string
- lcset = Utils.GetCharSet(mlist.preferred_language)
+ lcset = mlist.preferred_language.charset
pending = []
first = True
requestsdb = config.db.get_list_requests(mlist)
@@ -101,7 +101,7 @@ Cause: $reason"""))
pending.append('')
# Coerce all items in pending to a Unicode so we can join them
upending = []
- charset = Utils.GetCharSet(mlist.preferred_language)
+ charset = mlist.preferred_language.charset
for s in pending:
if isinstance(s, unicode):
upending.append(s)
@@ -112,7 +112,7 @@ Cause: $reason"""))
# example, the request was pended while the list's language was French,
# but then it was changed to English before checkdbs ran.
text = NL.join(upending)
- charset = Charset(Utils.GetCharSet(mlist.preferred_language))
+ charset = Charset(mlist.preferred_language.charset)
incodec = charset.input_codec or 'ascii'
outcodec = charset.output_codec or 'ascii'
if isinstance(text, unicode):
@@ -185,10 +185,10 @@ def main():
subject = _('$count $realname moderator request(s) waiting')
else:
subject = _('$realname moderator request check result')
- msg = Message.UserNotification(mlist.GetOwnerEmail(),
- mlist.GetBouncesEmail(),
- subject, text,
- mlist.preferred_language)
+ msg = UserNotification(mlist.GetOwnerEmail(),
+ mlist.GetBouncesEmail(),
+ subject, text,
+ mlist.preferred_language)
msg.send(mlist, **{'tomoderators': True})
finally:
mlist.Unlock()