------------------------------------------------------------ revno: 1463 committer: Mark Sapiro <m...@msapiro.net> branch nick: 2.1 timestamp: Sat 2014-04-19 17:54:06 -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.1 https://code.launchpad.net/~mailman-coders/mailman/2.1 Your team Mailman Checkins is subscribed to branch lp:mailman/2.1. To unsubscribe from this branch go to https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/Utils.py' --- Mailman/Utils.py 2014-04-15 19:59:48 +0000 +++ Mailman/Utils.py 2014-04-20 00:54:06 +0000 @@ -35,7 +35,6 @@ import base64 import random import urlparse -import collections import htmlentitydefs import email.Header import email.Iterators @@ -1096,7 +1095,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: @@ -1105,7 +1104,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