diff options
| author | Barry Warsaw | 2012-04-25 22:08:22 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-04-25 22:08:22 -0400 |
| commit | 658fad42b04420962e6ac478247411ee77483d93 (patch) | |
| tree | db16a22376b7191910bf674304c847850169144f /src/mailman/commands/cli_qfile.py | |
| parent | 4488631dff02731ff03f2fef01ee27bbd944812b (diff) | |
| download | mailman-658fad42b04420962e6ac478247411ee77483d93.tar.gz mailman-658fad42b04420962e6ac478247411ee77483d93.tar.zst mailman-658fad42b04420962e6ac478247411ee77483d93.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: |
