diff options
| author | Barry Warsaw | 2014-12-13 10:55:57 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2014-12-13 10:55:57 -0500 |
| commit | 03731dd2d3aac0c9610c3b17d28f6821343fc8ed (patch) | |
| tree | 4b977f3225d355ec42daf312b93b7ab407c827ee /src/mailman/commands/cli_qfile.py | |
| parent | e3e8b9215abb85b44fce001311332c2f7772e4bd (diff) | |
| download | mailman-03731dd2d3aac0c9610c3b17d28f6821343fc8ed.tar.gz mailman-03731dd2d3aac0c9610c3b17d28f6821343fc8ed.tar.zst mailman-03731dd2d3aac0c9610c3b17d28f6821343fc8ed.zip | |
Diffstat (limited to 'src/mailman/commands/cli_qfile.py')
| -rw-r--r-- | src/mailman/commands/cli_qfile.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mailman/commands/cli_qfile.py b/src/mailman/commands/cli_qfile.py index c4ff66aea..499476772 100644 --- a/src/mailman/commands/cli_qfile.py +++ b/src/mailman/commands/cli_qfile.py @@ -25,6 +25,8 @@ __all__ = [ ] +import six + from mailman.core.i18n import _ from mailman.interfaces.command import ICLISubCommand from mailman.utilities.interact import interact @@ -69,7 +71,7 @@ class QFile: """See `ICLISubCommand`.""" printer = PrettyPrinter(indent=4) assert len(args.qfile) == 1, 'Wrong number of positional arguments' - with open(args.qfile[0]) as fp: + with open(args.qfile[0], 'rb') as fp: while True: try: m.append(cPickle.load(fp)) @@ -80,7 +82,7 @@ class QFile: for i, obj in enumerate(m): count = i + 1 print(_('<----- start object $count ----->')) - if isinstance(obj, basestring): + if isinstance(obj, six.string_types): print(obj) else: printer.pprint(obj) |
