def bans(self, context, segments): """/<api>/bans /<api>/bans/<email> """ if len(segments) == 0: return BannedEmails(None) else: email = segments.pop(0) return BannedEmail(None, email), segments
def bans(self, context, segments): """Return a collection of mailing list's banned addresses.""" if self._mlist is None: return NotFound(), [] return BannedEmails(self._mlist)