def _get_maillist(listname):
    try:
        if (not listname):
            listname = config_value('NEWSLETTER', 'NEWSLETTER_NAME')
        if (listname == ''):
            log.warn('NEWSLETTER_NAME not set in store settings')
            raise NameError('No NEWSLETTER_NAME in settings')
        return (MailList.MailList(listname, lock=0), listname)
    except Errors.MMUnknownListError:
        ((print >> sys.stderr), ("Can't find the MailMan newsletter: %s" % listname))
        raise NameError(('No such newsletter, "%s"' % listname))
def _get_maillist(listname):
    try:
        if (not listname):
            listname = config_value('NEWSLETTER', 'NEWSLETTER_NAME')
        if (listname == ):
            log.warn('NEWSLETTER_NAME not set in store settings')
            raise NameError('No NEWSLETTER_NAME in settings')
        return (MailList.MailList(listname, lock=0), listname)
    except Errors.MMUnknownListError:
        ((print >> sys.stderr), ("Can't find the MailMan newsletter: %s" % listname))
        raise NameError(('No such newsletter, "%s"' % listname))