changeset 3519:db35fff4d5ec

sendmail.sendmail: don't use **kw
author Johannes Berg <johannes AT sipsolutions DOT net>
date Tue, 22 Apr 2008 23:14:13 +0200
parents ef612c82bdfd
children fa0ee02c9c39 58a97376342c
files MoinMoin/mail/sendmail.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/mail/sendmail.py	Tue Apr 22 23:00:40 2008 +0200
+++ b/MoinMoin/mail/sendmail.py	Tue Apr 22 23:14:13 2008 +0200
@@ -43,7 +43,7 @@
         return address.encode(config.charset)
 
 
-def sendmail(request, to, subject, text, **kw):
+def sendmail(request, to, subject, text, mail_from=None):
     """ Create and send a text/plain message
 
     Return a tuple of success or error indicator and message.
@@ -52,7 +52,7 @@
     @param to: recipients (list)
     @param subject: subject of email (unicode)
     @param text: email body text (unicode)
-    @keyword mail_from: override default mail_from
+    @param mail_from: override default mail_from
     @type mail_from: unicode
     @rtype: tuple
     @return: (is_ok, Description of error or OK message)
@@ -64,7 +64,7 @@
 
     _ = request.getText
     cfg = request.cfg
-    mail_from = kw.get('mail_from', '') or cfg.mail_from
+    mail_from = mail_from or cfg.mail_from
     subject = subject.encode(config.charset)
 
     # Create a text/plain body using CRLF (see RFC2822)