def fail_mail(msg): if len(r.batches) >= 1: spec = r.batches[0].spec else: spec = "None.spec" log.error("%s: %s" % (spec, msg)) m = Message() m.set_headers(to = r.requester_email, cc = config.builder_list) m.set_headers(subject = "building %s failed" % spec) m.write_line(msg) m.send()
def fail_mail(msg): if len(r.batches) >= 1: spec = r.batches[0].spec else: spec = "None.spec" log.error("%s: %s" % (spec, msg)) m = Message() m.set_headers(to=r.requester_email, cc=config.builder_list) m.set_headers(subject="building %s failed" % spec) m.write_line(msg) m.send()
def message_to(self): m = Message() m.set_headers(to = self.mail_to(), cc = config.builder_list) return m