diff options
| author | bwarsaw | 1999-07-03 01:24:54 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-07-03 01:24:54 +0000 |
| commit | be1c8c060dba8cc802866d9fdc7ba09735d8a102 (patch) | |
| tree | 55497228be500475720ddcfc7a9bba9c0ce48bc1 | |
| parent | 0832805285f1c596a1b2b22b4b4548d67485ad17 (diff) | |
| download | mailman-be1c8c060dba8cc802866d9fdc7ba09735d8a102.tar.gz mailman-be1c8c060dba8cc802866d9fdc7ba09735d8a102.tar.zst mailman-be1c8c060dba8cc802866d9fdc7ba09735d8a102.zip | |
Catch MMBadEmailError and print a sensible message (PR#59)
| -rwxr-xr-x | bin/newlist | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bin/newlist b/bin/newlist index 0b1f7b791..0cbcb696d 100755 --- a/bin/newlist +++ b/bin/newlist @@ -39,6 +39,7 @@ except ImportError: from Mailman.pythonlib import getpass from Mailman import MailList from Mailman import Utils +from Mailman import Errors from Mailman import mm_cfg from Mailman.Crypt import crypt @@ -88,9 +89,13 @@ def main(argv): # enforcing that all directories have the group sticky bit set oldmask = os.umask(002) try: - newlist.Create(list_name, owner_mail, pw) - finally: - os.umask(oldmask) + try: + newlist.Create(list_name, owner_mail, pw) + finally: + os.umask(oldmask) + except Errors.MMBadEmailError: + print 'Bad owner email address:', owner_mail + sys.exit(1) ###os.system('%s %s' % (ADDALIASES_CMD, list_name)) print ''' |
