INNER CODE UNIT · Python
LogEntry
weolar/miniblink49 · third_party/WebKit/Tools/RebaselineLogServer/main.py:60
class LogEntry(ndb.Model):
content = ndb.TextProperty()
date = ndb.DateTimeProperty(auto_now_add=True)
class SendMailCommand(object):
def execute(self, command_data):
if "to" not in command_data or "subject" not in command_data or "body" not in command_data:
return "Malformed command JSON"
to = command_data["to"]
subject = command_data["subject"]
body = command_data["body"]
htmlbody = command_data["htmlbody"] if "htmlbody" in command_data else body
mail.send_mail(sender=SENDER_ADDRESS,
to=to,
reply_to="@".join(["apavlov", "chromium.org"]),
cc=REBASELINES_LIST_ADDRESS,
subject="Auto-rebaseline bot: " + subject,