summaryrefslogtreecommitdiff
path: root/Mailman/Utils.py
diff options
context:
space:
mode:
authorbwarsaw1999-01-14 04:07:28 +0000
committerbwarsaw1999-01-14 04:07:28 +0000
commitcdd3e13c8178be25ec6ea687937093ca7e5a531a (patch)
treef7f7fc67dc6c160f151395707075436a91b15b97 /Mailman/Utils.py
parentd96a809293ce9a32e2da05b43d71cd57769587bb (diff)
downloadmailman-cdd3e13c8178be25ec6ea687937093ca7e5a531a.tar.gz
mailman-cdd3e13c8178be25ec6ea687937093ca7e5a531a.tar.zst
mailman-cdd3e13c8178be25ec6ea687937093ca7e5a531a.zip
TrySMTPDelivery(): Slightly different format to the log format on
failure: the value is only printed if it's not false (e.g. None), and the deferred status is printed as well.
Diffstat (limited to 'Mailman/Utils.py')
-rw-r--r--Mailman/Utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index 7b3e69b5b..b9dc4a44b 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -216,12 +216,16 @@ def TrySMTPDelivery(recipient, sender, text, queue_entry):
else:
OutgoingQueue.dequeueMessage(queue_entry)
if failure:
+ t, v = failure[0], failure[1]
# XXX Here may be the place to get the failure info back to the list
# object, so it can disable the recipient, etc. But how?
from Logging.StampedLogger import StampedLogger
l = StampedLogger("smtp-failures", "TrySMTPDelivery", immediate=1)
l.write("To %s:\n" % recipient)
- l.write("\t %s / %s\n" % (failure[0], failure[1]))
+ l.write("\t %s" % t)
+ if v:
+ l.write(' / %s' % v)
+ l.write(' (%s)\n' % (defer and 'deferred' or 'dequeued'))
l.flush()