diff options
| author | Barry Warsaw | 2012-06-03 13:21:38 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-06-03 13:21:38 -0400 |
| commit | e1aa901fbdcc6d7fbb495a1d9ca1a5079008164a (patch) | |
| tree | 9146fed874216bfb88707848568d7598ec2e8522 /src/mailman/commands/cli_inject.py | |
| parent | 847409ba333375bd9c168e28f15748e58970404f (diff) | |
| parent | 3c8a07fc76176a8ea89ee6b73aef571d0b2c81ed (diff) | |
| download | mailman-e1aa901fbdcc6d7fbb495a1d9ca1a5079008164a.tar.gz mailman-e1aa901fbdcc6d7fbb495a1d9ca1a5079008164a.tar.zst mailman-e1aa901fbdcc6d7fbb495a1d9ca1a5079008164a.zip | |
Diffstat (limited to 'src/mailman/commands/cli_inject.py')
| -rw-r--r-- | src/mailman/commands/cli_inject.py | 13 |
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: |
