Changeset 4e7fdaf in rtems-source-builder


Ignore:
Timestamp:
Oct 31, 2017, 12:56:23 AM (18 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
4dc9bf3
Parents:
e274bdf
Message:

sb: Make a to_addr comma list a Python list for sending.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source-builder/sb/mailer.py

    re274bdf r4e7fdaf  
    9393        msg = "From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n" % \
    9494            (from_addr, to_addr, subject) + body
     95        if type(to_addr) is str:
     96            to_addr = to_addr.split(',')
     97        if type(to_addr) is not list:
     98            raise error.general('invalid to_addr type')
    9599        try:
    96100            s = smtplib.SMTP(self.smtp_host())
    97             s.sendmail(from_addr, [to_addr], msg)
     101            s.sendmail(from_addr, to_addr, msg)
    98102        except smtplib.SMTPException as se:
    99103            raise error.general('sending mail: %s' % (str(se)))
Note: See TracChangeset for help on using the changeset viewer.