summaryrefslogtreecommitdiff
path: root/Mailman
diff options
context:
space:
mode:
authorbwarsaw2001-07-06 05:37:04 +0000
committerbwarsaw2001-07-06 05:37:04 +0000
commit97967ae4b24fee20f9727d0f71a488343918b93e (patch)
treef2eeb373b6a11ad9e69ae446bf1cc742b9dcd8ea /Mailman
parentf7c58d6098c9a548339633360d92dc563d993ec2 (diff)
downloadmailman-97967ae4b24fee20f9727d0f71a488343918b93e.tar.gz
mailman-97967ae4b24fee20f9727d0f71a488343918b93e.tar.zst
mailman-97967ae4b24fee20f9727d0f71a488343918b93e.zip
process(): Call syslog.write_ex() directly (instead of syslog.write()
implied by syslog.__call__()), passing in the MsgSafeDict instance to the kws argument. This works around the Python limitation that **kws in extended calls must be concrete dictionary objects.
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/Handlers/SMTPDirect.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Mailman/Handlers/SMTPDirect.py b/Mailman/Handlers/SMTPDirect.py
index 08b8e26e3..96433f2a6 100644
--- a/Mailman/Handlers/SMTPDirect.py
+++ b/Mailman/Handlers/SMTPDirect.py
@@ -85,13 +85,13 @@ def process(mlist, msg, msgdata):
# still worthwhile doing the interpolation in syslog() because it'll catch
# any catastrophic exceptions due to bogus format strings.
if mm_cfg.SMTP_LOG_EVERY_MESSAGE:
- syslog(mm_cfg.SMTP_LOG_EVERY_MESSAGE[0],
- mm_cfg.SMTP_LOG_EVERY_MESSAGE[1], **d.copy())
+ syslog.write_ex(mm_cfg.SMTP_LOG_EVERY_MESSAGE[0],
+ mm_cfg.SMTP_LOG_EVERY_MESSAGE[1], kws=d)
if refused:
if mm_cfg.SMTP_LOG_REFUSED:
- syslog(mm_cfg.SMTP_LOG_REFUSED[0],
- mm_cfg.SMTP_LOG_REFUSED[1], **d.copy())
+ syslog.write_ex(mm_cfg.SMTP_LOG_REFUSED[0],
+ mm_cfg.SMTP_LOG_REFUSED[1], kws=d)
elif msgdata.get('tolist'):
# Log the successful post, but only if it really was a post to the
@@ -100,8 +100,8 @@ def process(mlist, msg, msgdata):
# the other messages, but in that case, we should probably have a
# separate configuration variable to control that.
if mm_cfg.SMTP_LOG_SUCCESS:
- syslog(mm_cfg.SMTP_LOG_SUCCESS[0],
- mm_cfg.SMTP_LOG_SUCCESS[1], **d.copy())
+ syslog.write_ex(mm_cfg.SMTP_LOG_SUCCESS[0],
+ mm_cfg.SMTP_LOG_SUCCESS[1], kws=d)
# Process any failed deliveries.
tempfailures = []
@@ -127,8 +127,8 @@ def process(mlist, msg, msgdata):
d.update({'recipient': recip,
'failcode' : code,
'failmsg' : smtpmsg})
- syslog(mm_cfg.SMTP_LOG_EACH_FAILURE[0],
- mm_cfg.SMTP_LOG_EACH_FAILURE[1], **d.copy())
+ syslog.write_ex(mm_cfg.SMTP_LOG_EACH_FAILURE[0],
+ mm_cfg.SMTP_LOG_EACH_FAILURE[1], kws=d)
# Return the results
if tempfailures or permfailures:
raise Errors.SomeRecipientsFailed(tempfailures, permfailures)