From a9f1104c743d1a118a3c7f6d2fc3b9890170af8f Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 19 Jan 2011 16:40:27 -0500 Subject: [PATCH] smtpHost may not be present, use get to satisfy both tests and low-level creation --- .gitignore | 6 ++++++ superlance/process_state_email_monitor.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..264879d --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +env26/ +*.egg +*.egg-info +dist/ +*.pyc + diff --git a/superlance/process_state_email_monitor.py b/superlance/process_state_email_monitor.py index bafcd01..951476d 100644 --- a/superlance/process_state_email_monitor.py +++ b/superlance/process_state_email_monitor.py @@ -64,7 +64,7 @@ def __init__(self, **kwargs): self.fromEmail = kwargs['fromEmail'] self.toEmail = kwargs['toEmail'] self.subject = kwargs.get('subject', 'Alert from supervisord') - self.smtpHost = kwargs['smtpHost'] + self.smtpHost = kwargs.get('smtpHost', 'localhost') self.digestLen = 76 def sendBatchNotification(self):