------------------------------------------------------------ revno: 1321 committer: Mark Sapiro <m...@msapiro.net> branch nick: 2.2 timestamp: Sat 2014-04-19 17:55:12 -0700 message: The new Utils.IsDMARCProhibited() used collections.defaultdict which requires Python 2.5. Changed to use a dict and setdefault. modified: Mailman/Utils.py
-- lp:mailman/2.2 https://code.launchpad.net/~mailman-coders/mailman/2.2 Your team Mailman Checkins is subscribed to branch lp:mailman/2.2. To unsubscribe from this branch go to https://code.launchpad.net/~mailman-coders/mailman/2.2/+edit-subscription
=== modified file 'Mailman/Utils.py' --- Mailman/Utils.py 2014-04-15 20:55:52 +0000 +++ Mailman/Utils.py 2014-04-20 00:55:12 +0000 @@ -35,7 +35,6 @@ import base64 import random import urlparse -import collections import htmlentitydefs import email.Header import email.Iterators @@ -1152,7 +1151,7 @@ # where the answer section only contains what was asked for, nor to include # CNAMEs before the values they point to. full_record = "" - results_by_name = collections.defaultdict(list) + results_by_name = {} cnames = {} want_names = set([dmarc_domain + '.']) for txt_rec in txt_recs.response.answer: @@ -1161,7 +1160,7 @@ txt_rec.items[0].target.to_text()) if txt_rec.rdtype != dns.rdatatype.TXT: continue - results_by_name[txt_rec.name.to_text()].append( + results_by_name.setdefault(txt_rec.name.to_text(), []).append( "".join(txt_rec.items[0].strings)) expands = list(want_names) seen = set(expands)
_______________________________________________ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org