From f501f7e1d2f6f3db6c7e8d320cc0c71d54cb42d1 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Thu, 7 Apr 2016 18:05:22 +0200 Subject: use the dictionary **kwargs for the arguments of the functions send_* --- src/web/emails.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/web/emails.py b/src/web/emails.py index 7be65995..9967fefb 100644 --- a/src/web/emails.py +++ b/src/web/emails.py @@ -49,16 +49,9 @@ def send(*args, **kwargs): or a SMTP server. """ if conf.ON_HEROKU: - send_postmark(to=kwargs.get("to"), - bcc=kwargs.get("bcc"), - subject=kwargs.get("subject"), - plaintext=kwargs.get("plaintext")) + send_postmark(**kwargs) else: - send_smtp(to=kwargs.get("to"), - bcc=kwargs.get("bcc"), - subject=kwargs.get("subject"), - plaintext=kwargs.get("plaintext"), - html=kwargs.get("html")) + send_smtp(**kwargs) def send_smtp(to="", bcc="", subject="", plaintext="", html=""): """ -- cgit