Skip to content

Commit

Permalink
Fixed syntax Error
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Venturini committed Jul 28, 2016
1 parent 6893316 commit af2d1f3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions graphite_beacon/handlers/smtp.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,15 @@ def init_handler(self):

@gen.coroutine
def notify(self, level, *args, **kwargs):
LOGGER.debug("Handler (%s) %s", self.name, level)

LOGGER.debug("Handler (%s) %s", self.name, level)
msg = self.get_message(level, *args, **kwargs)
msg['Subject'] = self.get_short(level, *args, **kwargs)
try:
msg['From'] = args[0].options["smtp"]["from"]
except Exception as e:
msg['From'] = self.options['from']
try:
msg['To'] = ", ".join(args[0].options["smtp"]["to"]
msg['To'] = ", ".join(args[0].options["smtp"]["to"])
except Exception as e:
msg['To'] = ", ".join(self.options['to'])
smtp = SMTP()
Expand Down

0 comments on commit af2d1f3

Please sign in to comment.