Error when trying to change default actions for messages if acceptable_aliases is set to []
I've got a small instance of mailman with 4 lists running. On two of them, I can change the default actions for messages no problem. On the other two, when I try to change the default action for members, I get the following (redacted slightly to disguise the production instance in question):
Request Method: POST
Request URL: http://REDACTED.EXAMPLE.COM/mailman3/lists/LIST.REDACTED.EXAMPLE.COM/settings/message_acceptance
Django Version: 1.7.10
Exception Type: UnboundLocalError
Exception Value:
local variable 'HTTPError' referenced before assignment
Exception Location: /home/mailman/mailman-bundler/eggs/postorius-1.0.1-py2.7.egg/postorius/views/list.py in list_settings, line 787
Python Executable: /home/mailman/venv/bin/python2
(...)
Traceback Switch to copy-and-paste view
/home/terri/mailman-bundler/eggs/Django-1.7.10-py2.7.egg/django/core/handlers/base.py in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
...
▶ Local vars
/home/mailman/mailman-bundler/eggs/postorius-1.0.1-py2.7.egg/postorius/auth/decorators.py in wrapper
return fn(*args, **kwargs)
...
▶ Local vars
/home/mailman/mailman-bundler/eggs/postorius-1.0.1-py2.7.egg/postorius/views/list.py in list_settings
except HTTPError as e:
...
▶ Local vars
It was not initially clear to me what made those two lists different, but I've figured out now that it's because the acceptable aliases were set to [] (that is, a string containing an open square bracket followed by a close square bracket). Presumably some sort of parse error is occurring that we should handle appropriately.