diff options
| author | Barry Warsaw | 2015-03-21 21:32:12 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2015-03-21 21:32:12 -0400 |
| commit | 783163c4e7eda6d5983bcca512db645c64dad349 (patch) | |
| tree | ae0a79ac7d8b80ad4cc5a54f003ea61d3e01f3d0 /src/mailman/commands/cli_members.py | |
| parent | 18b7980823d2f9d5b7b0f50596cc05e8efb845e8 (diff) | |
| download | mailman-783163c4e7eda6d5983bcca512db645c64dad349.tar.gz mailman-783163c4e7eda6d5983bcca512db645c64dad349.tar.zst mailman-783163c4e7eda6d5983bcca512db645c64dad349.zip | |
Diffstat (limited to 'src/mailman/commands/cli_members.py')
| -rw-r--r-- | src/mailman/commands/cli_members.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mailman/commands/cli_members.py b/src/mailman/commands/cli_members.py index e4cad5966..ccacbeeb8 100644 --- a/src/mailman/commands/cli_members.py +++ b/src/mailman/commands/cli_members.py @@ -27,15 +27,14 @@ import codecs from email.utils import formataddr, parseaddr from mailman.app.membership import add_member -from mailman.config import config from mailman.core.i18n import _ from mailman.database.transaction import transactional from mailman.interfaces.command import ICLISubCommand from mailman.interfaces.listmanager import IListManager from mailman.interfaces.member import ( AlreadySubscribedError, DeliveryMode, DeliveryStatus) +from mailman.interfaces.subscriptions import RequestRecord from operator import attrgetter -from passlib.utils import generate_password as generate from zope.component import getUtility from zope.interface import implementer @@ -193,12 +192,11 @@ class Members: continue # Parse the line and ensure that the values are unicodes. display_name, email = parseaddr(line) - # Give the user a default, user-friendly password. - password = generate(int(config.passwords.password_length)) try: - add_member(mlist, email, display_name, password, - DeliveryMode.regular, - mlist.preferred_language.code) + add_member(mlist, + RequestRecord(email, display_name, + DeliveryMode.regular, + mlist.preferred_language.code)) except AlreadySubscribedError: # It's okay if the address is already subscribed, just # print a warning and continue. |
