------------------------------------------------------------
revno: 1395
fixes bug: https://launchpad.net/bugs/558253
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Fri 2013-07-12 15:11:08 -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.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/Gui/GUIBase.py'
--- Mailman/Gui/GUIBase.py 2008-04-21 16:04:49 +0000
+++ Mailman/Gui/GUIBase.py 2013-07-12 22:11:08 +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:29:44 +0000
+++ NEWS 2013-07-12 22:11:08 +0000
@@ -61,6 +61,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
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org