From 6e5e8c0c4528ed3326c7550fcdecfb1d4543dadb 2015-12-12 07:56:39 From: Miguel Valdez Date: 2015-12-12 07:56:39 Subject: [PATCH] minor changes --- diff --git a/schainpy/admin.py b/schainpy/admin.py index b7ed04f..f044be0 100644 --- a/schainpy/admin.py +++ b/schainpy/admin.py @@ -247,6 +247,10 @@ class SchainNotify: Exceptions: None. """ + + if not self.__emailToAddress: + return 0 + print "***** Sending alert to %s *****" %self.__emailToAddress # set up message @@ -257,9 +261,12 @@ class SchainNotify: subtitle=subtitle, filename=filename) - if sent: - print "***** Your system administrator has been notified *****" + if not sent: + return 0 + print "***** Your system administrator has been notified *****" + + return 1 def notify(self, email, message, subject = "", subtitle="", filename=""): """notify sends an email with the given message and title to email.