diff options
author | Holger Freyther <zecke@selfish.org> | 2005-07-26 15:06:18 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-07-26 15:06:18 +0000 |
commit | 8eecf9974f76eb913131f0538dbb8d70e37c3cb4 (patch) | |
tree | 2939094eac8b1547e246ef1a245da28a06535dac /classes | |
parent | 13e06f356fb0c427c1e0007fbf2cf7ea4243b2fa (diff) |
openembedded/tinderclient/tinderclient.bbclass:
-event.data -> data in tinder_send_email
-implement HTTP post (untested)
set TINDER_SENDLOG to 'http'
set TINDER_HOST to ewi....nl
set TINDER_URL to /OE_qa/cgi-bin/process_builds.cgi
Diffstat (limited to 'classes')
-rw-r--r-- | classes/tinderclient.bbclass | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/classes/tinderclient.bbclass b/classes/tinderclient.bbclass index c55b380277..e8e9ba7c42 100644 --- a/classes/tinderclient.bbclass +++ b/classes/tinderclient.bbclass @@ -6,18 +6,23 @@ def tinder_send_email(data, header, log): import smtplib from email.MIMEText import MIMEText msg = MIMEText(header +'\n' + log) - msg['Subject'] = data.getVar('TINDER_SUBJECT',event.data, True) or "Tinder-Client build log" - msg['To'] = data.getVar('TINDER_MAILTO',event.data, True) - msg['From'] = data.getVar('TINDER_FROM', event.data, True) + msg['Subject'] = bb.data.getVar('TINDER_SUBJECT',data, True) or "Tinder-Client build log" + msg['To'] = bb.data.getVar('TINDER_MAILTO' ,data, True) + msg['From'] = bb.data.getVar('TINDER_FROM', data, True) s = smtplib.SMTP() s.connect() - s.sendmail(data.getVar('TINDER_FROM', event.data, True), [data.getVar('TINDER_MAILTO', event.data, True)], msg.as_string()) + s.sendmail(bb.data.getVar('TINDER_FROM', data, True), [bb.data.getVar('TINDER_MAILTO', data, True)], msg.as_string()) s.close() def tinder_send_http(data, header, log): - pass + cont = header + '\n' + log + import httplib + conn = httplib.HTPPConnection(bb.data.getVar('TINDER_HOST',data, True)) + conn.request("POST", bb.data.getVar('TINDER_URL',data,True),body=cont) + conn.close() + # Prepare tinderbox mail header def tinder_prepare_mail_header(data, status): |