Commit 1986bf9a authored by Aurélien Bompard's avatar Aurélien Bompard

Remove obsolete functions

parent 3e5bc174
......@@ -34,25 +34,3 @@ def render_api_error(request):
return render(request, 'postorius/errors/generic.html',
{'error': _('Mailman REST API not available. '
'Please start Mailman core.')})
def set_other_emails(user):
from postorius.models import MailmanUser, MailmanApiError, Mailman404Error
if hasattr(user, 'other_emails'):
user.other_emails = []
if not user.is_authenticated():
mm_user = MailmanUser.objects.get(
user.other_emails = [str(address) for address in mm_user.addresses
if address.verified_on is not None]
except (MailmanApiError, Mailman404Error, AttributeError) as e:
# MailmanApiError: No connection to Mailman
# Mailman404Error: The user does not have a mailman user associated
# AttributeError: Anonymous user
logger.warning("Mailman error while setting other emails for %s: %r",, e)
if in user.other_emails:
......@@ -86,13 +86,6 @@ class MailmanUserView(TemplateView, MailmanClientMixin):
user_obj.first_address = self._get_first_address(user_obj)
return user_obj
def _get_list(self, list_id):
if getattr(self, 'lists', None) is None:
self.lists = {}
if self.lists.get(list_id) is None:
self.lists[list_id] = List.objects.get(fqdn_listname=list_id)
return self.lists[list_id]
def _get_memberships(self):
memberships = []
for m in self.mm_user.subscriptions:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment