summaryrefslogtreecommitdiff
path: root/src/mailman/testing/helpers.py
diff options
context:
space:
mode:
authortoshio2012-03-14 05:30:52 +0000
committertoshio2012-03-14 05:30:52 +0000
commitd1a9979ecf35d05ed115651dcc6b8680af08b954 (patch)
treecde5caa9a9c20467b4cb3768b564d08e6a368b1a /src/mailman/testing/helpers.py
parentccde42a936f6c87032c7afd80f33ca5f3fa00b54 (diff)
parentbcc42e2201c7172848185e5675a7b79e3d28aa0f (diff)
downloadmailman-d1a9979ecf35d05ed115651dcc6b8680af08b954.tar.gz
mailman-d1a9979ecf35d05ed115651dcc6b8680af08b954.tar.zst
mailman-d1a9979ecf35d05ed115651dcc6b8680af08b954.zip
Diffstat (limited to 'src/mailman/testing/helpers.py')
-rw-r--r--src/mailman/testing/helpers.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mailman/testing/helpers.py b/src/mailman/testing/helpers.py
index e61aca605..58c72d6d9 100644
--- a/src/mailman/testing/helpers.py
+++ b/src/mailman/testing/helpers.py
@@ -223,7 +223,7 @@ class LMTP(smtplib.SMTP):
return code, msg
-def get_lmtp_client():
+def get_lmtp_client(quiet=False):
"""Return a connected LMTP client."""
# It's possible the process has started but is not yet accepting
# connections. Wait a little while.
@@ -233,7 +233,8 @@ def get_lmtp_client():
try:
response = lmtp.connect(
config.mta.lmtp_host, int(config.mta.lmtp_port))
- print response
+ if not quiet:
+ print response
return lmtp
except socket.error as error:
if error[0] == errno.ECONNREFUSED: