summaryrefslogtreecommitdiff
path: root/src/mailman/commands
diff options
context:
space:
mode:
authorAbhilash Raj2015-04-20 15:16:15 +0530
committerAbhilash Raj2015-04-20 15:16:15 +0530
commit58ea970fa0f9064ae052d2b9ae1371ef00bd23e6 (patch)
tree4d21000f8ad772377a655ff332288b1c753f5be1 /src/mailman/commands
parentec053e7682b14181147d0b7bedb1e5b19a46b56b (diff)
parent3eb81bf5078868b0fc44f991b0b4536a2a3f4b47 (diff)
downloadmailman-58ea970fa0f9064ae052d2b9ae1371ef00bd23e6.tar.gz
mailman-58ea970fa0f9064ae052d2b9ae1371ef00bd23e6.tar.zst
mailman-58ea970fa0f9064ae052d2b9ae1371ef00bd23e6.zip
merge trunk and fix merge conflicts
Diffstat (limited to 'src/mailman/commands')
-rw-r--r--src/mailman/commands/cli_control.py4
-rw-r--r--src/mailman/commands/eml_confirm.py11
-rw-r--r--src/mailman/commands/tests/test_confirm.py3
3 files changed, 14 insertions, 4 deletions
diff --git a/src/mailman/commands/cli_control.py b/src/mailman/commands/cli_control.py
index f58005e0f..5bd9ef1e3 100644
--- a/src/mailman/commands/cli_control.py
+++ b/src/mailman/commands/cli_control.py
@@ -56,7 +56,7 @@ class Start:
default=False, action='store_true',
help=_("""\
If the master watcher finds an existing master lock, it will
- normally exit with an error message. With this option,the master
+ normally exit with an error message. With this option, the master
will perform an extra level of checking. If a process matching
the host/pid described in the lock file is running, the master
will still exit, requiring you to manually clean up the lock. But
@@ -78,7 +78,7 @@ class Start:
This flag is not recommended for normal production environments.
Note though, that if you run with -u and are not in the mailman
- group, you may have permission problems, such as begin unable to
+ group, you may have permission problems, such as being unable to
delete a list's archives through the web. Tough luck!"""))
command_parser.add_argument(
'-q', '--quiet',
diff --git a/src/mailman/commands/eml_confirm.py b/src/mailman/commands/eml_confirm.py
index 077fab9a6..ddf0db0e2 100644
--- a/src/mailman/commands/eml_confirm.py
+++ b/src/mailman/commands/eml_confirm.py
@@ -25,6 +25,7 @@ __all__ = [
from mailman.core.i18n import _
from mailman.interfaces.command import ContinueProcessing, IEmailCommand
from mailman.interfaces.registrar import IRegistrar
+from mailman.interfaces.subscriptions import TokenOwner
from zope.interface import implementer
@@ -53,7 +54,15 @@ class Confirm:
tokens.add(token)
results.confirms = tokens
try:
- succeeded = (IRegistrar(mlist).confirm(token) is None)
+ token, token_owner, member = IRegistrar(mlist).confirm(token)
+ if token is None:
+ assert token_owner is TokenOwner.no_one, token_owner
+ assert member is not None, member
+ succeeded = True
+ else:
+ assert token_owner is not TokenOwner.no_one, token_owner
+ assert member is None, member
+ succeeded = False
except LookupError:
# The token must not exist in the database.
succeeded = False
diff --git a/src/mailman/commands/tests/test_confirm.py b/src/mailman/commands/tests/test_confirm.py
index 98a26bf7d..e980141b0 100644
--- a/src/mailman/commands/tests/test_confirm.py
+++ b/src/mailman/commands/tests/test_confirm.py
@@ -46,7 +46,8 @@ class TestConfirm(unittest.TestCase):
self._mlist = create_list('test@example.com')
anne = getUtility(IUserManager).create_address(
'anne@example.com', 'Anne Person')
- self._token = IRegistrar(self._mlist).register(anne)
+ self._token, token_owner, member = IRegistrar(self._mlist).register(
+ anne)
self._command = Confirm()
# Clear the virgin queue.
get_queue_messages('virgin')