diff options
| author | Barry Warsaw | 2012-07-06 21:08:41 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-07-06 21:08:41 -0400 |
| commit | 8d8ab1655b51e277570005b445d3b014afcfbc57 (patch) | |
| tree | 6ba0147d975636e129a787c9dfa64dae8cffae89 /src/mailman/commands/cli_qfile.py | |
| parent | cd3f84b301c2150fea5402129a2e7bc862fbb52b (diff) | |
| parent | 01415190ab44e69a8f09a6411564a7cb288404e8 (diff) | |
| download | mailman-8d8ab1655b51e277570005b445d3b014afcfbc57.tar.gz mailman-8d8ab1655b51e277570005b445d3b014afcfbc57.tar.zst mailman-8d8ab1655b51e277570005b445d3b014afcfbc57.zip | |
Diffstat (limited to 'src/mailman/commands/cli_qfile.py')
| -rw-r--r-- | src/mailman/commands/cli_qfile.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mailman/commands/cli_qfile.py b/src/mailman/commands/cli_qfile.py index 78156f08c..b9e0eff02 100644 --- a/src/mailman/commands/cli_qfile.py +++ b/src/mailman/commands/cli_qfile.py @@ -17,7 +17,7 @@ """Getting information out of a qfile.""" -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 cPickle from pprint import PrettyPrinter -from zope.interface import implements +from zope.interface import implementer from mailman.core.i18n import _ from mailman.interfaces.command import ICLISubCommand @@ -39,11 +39,10 @@ m = [] +@implementer(ICLISubCommand) class QFile: """Get information out of a queue file.""" - implements(ICLISubCommand) - name = 'qfile' def add(self, parser, command_parser): @@ -79,15 +78,15 @@ class QFile: except EOFError: break if args.doprint: - print _('[----- start pickle -----]') + print(_('[----- start pickle -----]')) for i, obj in enumerate(m): count = i + 1 - print _('<----- start object $count ----->') + print(_('<----- start object $count ----->')) if isinstance(obj, basestring): - print obj + print(obj) else: printer.pprint(obj) - print _('[----- end pickle -----]') + print(_('[----- end pickle -----]')) count = len(m) banner = _("The variable 'm' contains $count objects") if args.interactive: |
