From d4d71f71f08d6d440b17482eecc5472dcfe6cbae Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 28 Apr 2014 11:23:35 -0400 Subject: Use print functions consistently through, and update all __future__ imports to reflect this. Also, mock out sys.stderr on some tests so that their nose2 output is quieter. A few other minor coding style consistencies. --- src/mailman/core/docs/runner.rst | 2 +- src/mailman/core/docs/switchboard.rst | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mailman/core/docs') diff --git a/src/mailman/core/docs/runner.rst b/src/mailman/core/docs/runner.rst index 00781578f..28eab9203 100644 --- a/src/mailman/core/docs/runner.rst +++ b/src/mailman/core/docs/runner.rst @@ -58,7 +58,7 @@ on instance variables. >>> filebase = switchboard.enqueue(msg, listname=mlist.fqdn_listname, ... foo='yes', bar='no') >>> runner.run() - >>> print runner.msg.as_string() + >>> print(runner.msg.as_string()) From: aperson@example.com To: test@example.com diff --git a/src/mailman/core/docs/switchboard.rst b/src/mailman/core/docs/switchboard.rst index 751b1e640..c8d2de079 100644 --- a/src/mailman/core/docs/switchboard.rst +++ b/src/mailman/core/docs/switchboard.rst @@ -17,7 +17,7 @@ Create a switchboard by giving its queue name and directory. >>> queue_directory = os.path.join(config.QUEUE_DIR, 'test') >>> from mailman.core.switchboard import Switchboard >>> switchboard = Switchboard('test', queue_directory) - >>> print switchboard.name + >>> print(switchboard.name) test >>> switchboard.queue_directory == queue_directory True @@ -32,9 +32,9 @@ Here's a helper function for ensuring things work correctly. ... root, ext = os.path.splitext(qfile) ... files[ext] = files.get(ext, 0) + 1 ... if len(files) == 0: - ... print 'empty' + ... print('empty') ... for ext in sorted(files): - ... print '{0}: {1}'.format(ext, files[ext]) + ... print('{0}: {1}'.format(ext, files[ext])) Enqueing and dequeing @@ -50,7 +50,7 @@ dictionary. To read the contents of a queue file, dequeue it. >>> msg, msgdata = switchboard.dequeue(filebase) - >>> print msg.as_string() + >>> print(msg.as_string()) From: aperson@example.com To: _xtest@example.com -- cgit v1.3.1