def sync_list_properties(store): """Sync the list properties from Mailman""" try: mm_client = get_mailman_client(store.settings) except HTTPError: return # Can't refresh at this time for mm_mlist in mm_client.lists: update_props(store, mm_mlist)
def get_mailinglist(list_name, settings, opts): mlist = FakeList(list_name) try: mm_client = get_mailman_client(settings) mm_list = mm_client.get_list(list_name) except (HTTPError, MailmanConnectionError), e: if opts.debug: print "Can't get the mailing-list from Mailman: %s" % e
def get_user_id(store, sender): global _MAILMAN_CLIENT if _MAILMAN_CLIENT is None: _MAILMAN_CLIENT = get_mailman_client(store.settings) try: mm_user = _MAILMAN_CLIENT.get_user(sender.email) except HTTPError, e: if e.code == 404: return None else: raise
def sync_list_properties(store): """Sync the list properties from Mailman""" try: mm_client = get_mailman_client(store.settings) except HTTPError: return # Can't refresh at this time for list_name in store.get_list_names(): try: mm_mlist = mm_client.get_list(list_name) except (HTTPError, mailmanclient.MailmanConnectionError): continue if mm_mlist: update_props(store, mm_mlist)