airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From criccom...@apache.org
Subject incubator-airflow git commit: [AIRFLOW-1958] Add **kwargs to send_email
Date Wed, 10 Jan 2018 18:39:09 GMT
Repository: incubator-airflow
Updated Branches:
  refs/heads/master ffc4a8b41 -> 97680d85f


[AIRFLOW-1958] Add **kwargs to send_email

Closes #2908 from ms32035/email_kwargs


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/97680d85
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/97680d85
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/97680d85

Branch: refs/heads/master
Commit: 97680d85f4cf035affe680e4dde63ef1ecd8380f
Parents: ffc4a8b
Author: Marcin Szymanski <ms32035@gmail.com>
Authored: Wed Jan 10 10:39:03 2018 -0800
Committer: Chris Riccomini <criccomini@apache.org>
Committed: Wed Jan 10 10:39:03 2018 -0800

----------------------------------------------------------------------
 airflow/contrib/utils/sendgrid.py |  4 +++-
 airflow/utils/email.py            | 12 +++++++++---
 2 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/97680d85/airflow/contrib/utils/sendgrid.py
----------------------------------------------------------------------
diff --git a/airflow/contrib/utils/sendgrid.py b/airflow/contrib/utils/sendgrid.py
index 7e83df1..f7af087 100644
--- a/airflow/contrib/utils/sendgrid.py
+++ b/airflow/contrib/utils/sendgrid.py
@@ -27,7 +27,9 @@ from airflow.utils.log.logging_mixin import LoggingMixin
 from sendgrid.helpers.mail import Attachment, Content, Email, Mail, Personalization
 
 
-def send_email(to, subject, html_content, files=None, dryrun=False, cc=None, bcc=None, mime_subtype='mixed'):
+def send_email(to, subject, html_content, files=None,
+               dryrun=False, cc=None, bcc=None,
+               mime_subtype='mixed', **kwargs):
     """
     Send an email with html content using sendgrid.
 

http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/97680d85/airflow/utils/email.py
----------------------------------------------------------------------
diff --git a/airflow/utils/email.py b/airflow/utils/email.py
index fadd4d5..4ecba8f 100644
--- a/airflow/utils/email.py
+++ b/airflow/utils/email.py
@@ -34,17 +34,23 @@ from airflow.exceptions import AirflowConfigException
 from airflow.utils.log.logging_mixin import LoggingMixin
 
 
-def send_email(to, subject, html_content, files=None, dryrun=False, cc=None, bcc=None, mime_subtype='mixed'):
+def send_email(to, subject, html_content, files=None,
+               dryrun=False, cc=None, bcc=None,
+               mime_subtype='mixed', **kwargs):
     """
     Send email using backend specified in EMAIL_BACKEND.
     """
     path, attr = configuration.get('email', 'EMAIL_BACKEND').rsplit('.', 1)
     module = importlib.import_module(path)
     backend = getattr(module, attr)
-    return backend(to, subject, html_content, files=files, dryrun=dryrun, cc=cc, bcc=bcc,
mime_subtype=mime_subtype)
+    return backend(to, subject, html_content, files=files,
+                   dryrun=dryrun, cc=cc, bcc=bcc,
+                   mime_subtype=mime_subtype, **kwargs)
 
 
-def send_email_smtp(to, subject, html_content, files=None, dryrun=False, cc=None, bcc=None,
mime_subtype='mixed'):
+def send_email_smtp(to, subject, html_content, files=None,
+                    dryrun=False, cc=None, bcc=None,
+                    mime_subtype='mixed', **kwargs):
     """
     Send an email with html content
 


Mime
View raw message