summaryrefslogtreecommitdiff
path: root/src/mailman/testing/helpers.py
diff options
context:
space:
mode:
authorBarry Warsaw2011-05-14 13:57:26 +0200
committerBarry Warsaw2011-05-14 13:57:26 +0200
commit5a35aef83485f656ed2ef9c67216131074d62920 (patch)
treef0042196210dff6d9780242b70c2707f867cbb3b /src/mailman/testing/helpers.py
parentc201299b4932ea153e765f6316bab4c02ff09e50 (diff)
downloadmailman-5a35aef83485f656ed2ef9c67216131074d62920.tar.gz
mailman-5a35aef83485f656ed2ef9c67216131074d62920.tar.zst
mailman-5a35aef83485f656ed2ef9c67216131074d62920.zip
Diffstat (limited to 'src/mailman/testing/helpers.py')
-rw-r--r--src/mailman/testing/helpers.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mailman/testing/helpers.py b/src/mailman/testing/helpers.py
index f3b0071d0..9f9ea6181 100644
--- a/src/mailman/testing/helpers.py
+++ b/src/mailman/testing/helpers.py
@@ -48,7 +48,6 @@ from contextlib import contextmanager
from email import message_from_string
from httplib2 import Http
from lazr.config import as_timedelta
-from operator import itemgetter
from urllib import urlencode
from urllib2 import HTTPError
from zope import event
@@ -126,7 +125,7 @@ def get_queue_messages(queue_name, sort_on=None):
messages.append(_Bag(msg=msg, msgdata=msgdata))
queue.finish(filebase)
if sort_on is not None:
- messages.sort(key=itemgetter(sort_on))
+ messages.sort(key=lambda item: item.msg[sort_on])
return messages