------------------------------------------------------------ revno: 1258 committer: Mark Sapiro <m...@msapiro.net> branch nick: 2.2 timestamp: Fri 2013-07-12 15:22:12 -0700 message: - Changed the admin GUI to report only the bad entries in a list of email addresses if any are bad. (LP: #558253) modified: Mailman/Gui/GUIBase.py NEWS
-- 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/Gui/GUIBase.py' --- Mailman/Gui/GUIBase.py 2008-04-21 16:04:49 +0000 +++ Mailman/Gui/GUIBase.py 2013-07-12 22:22:12 +0000 @@ -63,6 +63,7 @@ if isinstance(val, ListType): return val addrs = [] + bad_addrs = [] for addr in [s.strip() for s in val.split(NL)]: # Discard empty lines if not addr: @@ -77,22 +78,24 @@ try: re.compile(addr) except re.error: - raise ValueError + bad_addrs.append(addr) elif (wtype == mm_cfg.EmailListEx and addr.startswith('@') and property.endswith('_these_nonmembers')): # XXX Needs to be reviewed for list@domain names. # don't reference your own list if addr[1:] == mlist.internal_name(): - raise ValueError + bad_addrs.append(addr) # check for existence of list? For now allow # reference to list before creating it. else: - raise + bad_addrs.append(addr) if property in ('regular_exclude_lists', 'regular_include_lists'): if addr.lower() == mlist.GetListEmail().lower(): - raise Errors.EmailAddressError + bad_addrs.append(addr) addrs.append(addr) + if bad_addrs: + raise Errors.EmailAddressError, ', '.join(bad_addrs) return addrs # This is a host name, i.e. verbatim if wtype == mm_cfg.Host: @@ -168,9 +171,9 @@ except ValueError: doc.addError(_('Invalid value for variable: %(property)s')) # This is the parent of MMBadEmailError and MMHostileAddress - except Errors.EmailAddressError: + except Errors.EmailAddressError, error: doc.addError( - _('Bad email address for option %(property)s: %(val)s')) + _('Bad email address for option %(property)s: %(error)s')) else: # Set the attribute, which will normally delegate to the mlist self._setValue(mlist, property, val, doc) === modified file 'NEWS' --- NEWS 2013-07-12 21:31:02 +0000 +++ NEWS 2013-07-12 22:22:12 +0000 @@ -105,6 +105,9 @@ Bug Fixes and other patches + - Changed the admin GUI to report only the bad entries in a list of email + addresses if any are bad. (LP: #558253) + - Added logging for template errors in HyperArch.py. (LP: #558254) - Added more explanation to the bad owner address message from
_______________________________________________ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org