diff options
| author | Barry Warsaw | 2015-03-28 16:14:10 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2015-03-28 16:14:10 -0400 |
| commit | db5311200674432669787ef05d019536d3011c4e (patch) | |
| tree | 31ff2401763890d49ee0a2c94ec684709fc926dc /src/mailman/commands/cli_members.py | |
| parent | f3d34e989155cbe82e0c2db3fc9659ff73001dbe (diff) | |
| parent | eef0c0a53ed3068a1c8def64f51479673d7c08a7 (diff) | |
| download | mailman-db5311200674432669787ef05d019536d3011c4e.tar.gz mailman-db5311200674432669787ef05d019536d3011c4e.tar.zst mailman-db5311200674432669787ef05d019536d3011c4e.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. |
