summaryrefslogtreecommitdiff
path: root/src/mailman/commands/eml_confirm.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/commands/eml_confirm.py')
-rw-r--r--src/mailman/commands/eml_confirm.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mailman/commands/eml_confirm.py b/src/mailman/commands/eml_confirm.py
index 55619a503..c82dc64c3 100644
--- a/src/mailman/commands/eml_confirm.py
+++ b/src/mailman/commands/eml_confirm.py
@@ -17,7 +17,7 @@
"""Module stuff."""
-from __future__ import absolute_import, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
__metaclass__ = type
__all__ = [
@@ -26,7 +26,7 @@ __all__ = [
from zope.component import getUtility
-from zope.interface import implements
+from zope.interface import implementer
from mailman.core.i18n import _
from mailman.interfaces.command import ContinueProcessing, IEmailCommand
@@ -34,11 +34,10 @@ from mailman.interfaces.registrar import IRegistrar
+@implementer(IEmailCommand)
class Confirm:
"""The email 'confirm' command."""
- implements(IEmailCommand)
-
name = 'confirm'
argument_description = 'token'
description = _('Confirm a subscription request.')
@@ -48,7 +47,7 @@ class Confirm:
"""See `IEmailCommand`."""
# The token must be in the arguments.
if len(arguments) == 0:
- print >> results, _('No confirmation token found')
+ print(_('No confirmation token found'), file=results)
return ContinueProcessing.no
# Make sure we don't try to confirm the same token more than once.
token = arguments[0]
@@ -60,7 +59,7 @@ class Confirm:
results.confirms = tokens
succeeded = getUtility(IRegistrar).confirm(token)
if succeeded:
- print >> results, _('Confirmed')
+ print(_('Confirmed'), file=results)
return ContinueProcessing.yes
- print >> results, _('Confirmation token did not match')
+ print(_('Confirmation token did not match'), file=results)
return ContinueProcessing.no