diff options
Diffstat (limited to '')
| -rw-r--r-- | src/mailman/bin/bumpdigests.py | 4 | ||||
| -rw-r--r-- | src/mailman/bin/checkdbs.py | 2 | ||||
| -rw-r--r-- | src/mailman/bin/docs/master.rst | 2 | ||||
| -rw-r--r-- | src/mailman/bin/master.py | 4 | ||||
| -rw-r--r-- | src/mailman/bin/onebounce.py | 4 | ||||
| -rw-r--r-- | src/mailman/bin/runner.py | 7 | ||||
| -rw-r--r-- | src/mailman/bin/tests/test_master.py | 2 |
7 files changed, 13 insertions, 12 deletions
diff --git a/src/mailman/bin/bumpdigests.py b/src/mailman/bin/bumpdigests.py index 25fbe7739..020eb59ce 100644 --- a/src/mailman/bin/bumpdigests.py +++ b/src/mailman/bin/bumpdigests.py @@ -51,7 +51,7 @@ def main(): listnames = set(args or config.list_manager.names) if not listnames: - print _('Nothing to do.') + print(_('Nothing to do.')) sys.exit(0) for listname in listnames: @@ -60,7 +60,7 @@ def main(): mlist = MailList.MailList(listname) except errors.MMListError: parser.print_help() - print >> sys.stderr, _('No such list: $listname') + print(_('No such list: $listname'), file=sys.stderr) sys.exit(1) try: mlist.bump_digest_volume() diff --git a/src/mailman/bin/checkdbs.py b/src/mailman/bin/checkdbs.py index 3a5ad736e..7b0c6c6f2 100644 --- a/src/mailman/bin/checkdbs.py +++ b/src/mailman/bin/checkdbs.py @@ -51,7 +51,7 @@ Check for pending admin requests and mail the list owners if necessary.""")) opts, args = parser.parse_args() if args: parser.print_help() - print >> sys.stderr, _('Unexpected arguments') + print(_('Unexpected arguments'), file=sys.stderr) sys.exit(1) return opts, args, parser diff --git a/src/mailman/bin/docs/master.rst b/src/mailman/bin/docs/master.rst index c4410bf16..3d10b69ac 100644 --- a/src/mailman/bin/docs/master.rst +++ b/src/mailman/bin/docs/master.rst @@ -44,7 +44,7 @@ None of the children are running now. >>> for pid in master.runner_pids: ... try: ... os.kill(pid, 0) - ... print 'Process did not exit:', pid + ... print('Process did not exit:', pid) ... except OSError as error: ... if error.errno == errno.ESRCH: ... # The child process exited. diff --git a/src/mailman/bin/master.py b/src/mailman/bin/master.py index 29d5401f6..2b3ec87c4 100644 --- a/src/mailman/bin/master.py +++ b/src/mailman/bin/master.py @@ -17,7 +17,7 @@ """Master subprocess watcher.""" -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, print_function, unicode_literals __metaclass__ = type __all__ = [ @@ -518,7 +518,7 @@ def main(): lock = acquire_lock(options.options.force) try: with open(config.PID_FILE, 'w') as fp: - print >> fp, os.getpid() + print(os.getpid(), file=fp) loop = Loop(lock, options.options.restartable, options.options.config) loop.install_signal_handlers() try: diff --git a/src/mailman/bin/onebounce.py b/src/mailman/bin/onebounce.py index 32f56cb9d..1c23fc42a 100644 --- a/src/mailman/bin/onebounce.py +++ b/src/mailman/bin/onebounce.py @@ -18,7 +18,7 @@ """Test bounce detection on message files.""" -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, print_function, unicode_literals __metaclass__ = type __all__ = [ @@ -70,5 +70,5 @@ def main(): options.initialize() if options.options.list: - print 'list of available bounce modules.' + print('list of available bounce modules.') sys.exit(0) diff --git a/src/mailman/bin/runner.py b/src/mailman/bin/runner.py index c5040e3e3..76da0364f 100644 --- a/src/mailman/bin/runner.py +++ b/src/mailman/bin/runner.py @@ -17,7 +17,7 @@ """The runner process.""" -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, print_function, unicode_literals __metaclass__ = type __all__ = [ @@ -82,7 +82,8 @@ def make_runner(name, slice, range, once=False): if os.environ.get('MAILMAN_UNDER_MASTER_CONTROL') is not None: # Exit with SIGTERM exit code so the master watcher won't try to # restart us. - print >> sys.stderr, _('Cannot import runner module: $class_path') + print(_('Cannot import runner module: $class_path'), + file=sys.stderr) traceback.print_exc() sys.exit(signal.SIGTERM) else: @@ -190,7 +191,7 @@ def main(): for shortname in sorted(descriptions): classname = descriptions[shortname] name = (' ' * (longest - len(shortname))) + shortname - print _('$name runs $classname') + print(_('$name runs $classname')) sys.exit(0) runner = make_runner(*args.runner, once=args.once) diff --git a/src/mailman/bin/tests/test_master.py b/src/mailman/bin/tests/test_master.py index 6d859b44b..924fbeafd 100644 --- a/src/mailman/bin/tests/test_master.py +++ b/src/mailman/bin/tests/test_master.py @@ -17,7 +17,7 @@ """Test master watcher utilities.""" -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, print_function, unicode_literals __metaclass__ = type __all__ = [ |
