summaryrefslogtreecommitdiff
path: root/src/mailman/commands/cli_inject.py
diff options
context:
space:
mode:
authorBarry Warsaw2012-04-25 22:08:22 -0400
committerBarry Warsaw2012-04-25 22:08:22 -0400
commit658fad42b04420962e6ac478247411ee77483d93 (patch)
treedb16a22376b7191910bf674304c847850169144f /src/mailman/commands/cli_inject.py
parent4488631dff02731ff03f2fef01ee27bbd944812b (diff)
downloadmailman-658fad42b04420962e6ac478247411ee77483d93.tar.gz
mailman-658fad42b04420962e6ac478247411ee77483d93.tar.zst
mailman-658fad42b04420962e6ac478247411ee77483d93.zip
Diffstat (limited to 'src/mailman/commands/cli_inject.py')
-rw-r--r--src/mailman/commands/cli_inject.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mailman/commands/cli_inject.py b/src/mailman/commands/cli_inject.py
index 321a92c78..1434fd2a6 100644
--- a/src/mailman/commands/cli_inject.py
+++ b/src/mailman/commands/cli_inject.py
@@ -17,7 +17,7 @@
"""bin/mailman inject"""
-from __future__ import absolute_import, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
__metaclass__ = type
__all__ = [
@@ -28,7 +28,7 @@ __all__ = [
import sys
from zope.component import getUtility
-from zope.interface import implements
+from zope.interface import implementer
from mailman.app.inject import inject_text
from mailman.config import config
@@ -38,11 +38,10 @@ from mailman.interfaces.listmanager import IListManager
+@implementer(ICLISubCommand)
class Inject:
"""Inject a message from a file into a mailing list's queue."""
- implements(ICLISubCommand)
-
name = 'inject'
def add(self, parser, command_parser):
@@ -82,9 +81,9 @@ class Inject:
# Process --show first; if given, print output and exit, ignoring all
# other command line switches.
if args.show:
- print 'Available queues:'
+ print('Available queues:')
for switchboard in sorted(config.switchboards):
- print ' ', switchboard
+ print(' ', switchboard)
return
# Could be None or sequence of length 0.
if args.listname is None:
@@ -106,7 +105,7 @@ class Inject:
try:
message_text = sys.stdin.read()
except KeyboardInterrupt:
- print 'Interrupted'
+ print('Interrupted')
sys.exit(1)
else:
with open(args.filename) as fp: