diff options
| author | bwarsaw | 2001-11-05 23:26:45 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-11-05 23:26:45 +0000 |
| commit | 1749bc07516a330b388040cc4b40c1e7ed4ab8b8 (patch) | |
| tree | 2b9fe5de74d664121c0e9859256e018852329928 | |
| parent | 2cbba73102a2bb524934cbecbdccba91f41c2822 (diff) | |
| download | mailman-1749bc07516a330b388040cc4b40c1e7ed4ab8b8.tar.gz mailman-1749bc07516a330b388040cc4b40c1e7ed4ab8b8.tar.zst mailman-1749bc07516a330b388040cc4b40c1e7ed4ab8b8.zip | |
| -rwxr-xr-x | cron/mailpasswds | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cron/mailpasswds b/cron/mailpasswds index 8b683549d..ef961c6f2 100755 --- a/cron/mailpasswds +++ b/cron/mailpasswds @@ -43,9 +43,11 @@ import paths # script from cron with python -S will fail. from Mailman import mm_cfg from Mailman import MailList +from Mailman import Errors from Mailman import Utils from Mailman import Message from Mailman.i18n import _ +from Mailman.Logging.Syslog import syslog # Work around known problems with some RedHat cron daemons import signal @@ -79,7 +81,14 @@ def main(): # This is the list that all the reminders will look like they come from, # but with the host name coerced to the virtual host we're processing. - sitelist = MailList.MailList(mm_cfg.MAILMAN_SITE_LIST, lock=0) + try: + sitelist = MailList.MailList(mm_cfg.MAILMAN_SITE_LIST, lock=0) + except Errors.MMUnknownListError: + # Do it this way for I18n's _() + sitelistname = mm_cfg.MAILMAN_SITE_LIST + print >> sys.stderr, _('Site list is missing: %(sitelistname)s') + syslog('error', 'Site list is missing: %s', mm_cfg.MAILMAN_SITE_LIST) + sys.exit(1) # Group lists by host_name if VIRTUAL_HOST_OVERVIEW is true, otherwise # there's only one key in this dictionary: mm_cfg.DEFAULT_HOST_NAME. The |
