diff options
author | Richard Purdie <richard@openedhand.com> | 2006-07-23 17:57:13 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-07-23 17:57:13 +0000 |
commit | f75754d05bfac568380d2b6c8f7fb33186082a58 (patch) | |
tree | 362197d2834879469151c1aad9c9f853c4147c36 | |
parent | 9cf2871aae7d2c6397dcd18cd4e9d2ea003c34bf (diff) | |
download | openembedded-core-f75754d05bfac568380d2b6c8f7fb33186082a58.tar.gz openembedded-core-f75754d05bfac568380d2b6c8f7fb33186082a58.tar.bz2 openembedded-core-f75754d05bfac568380d2b6c8f7fb33186082a58.tar.xz openembedded-core-f75754d05bfac568380d2b6c8f7fb33186082a58.zip |
tinderclient.bbclass: Update from .dev
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@543 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r-- | meta/classes/tinderclient.bbclass | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/meta/classes/tinderclient.bbclass b/meta/classes/tinderclient.bbclass index 6e10d0f34..f544c203f 100644 --- a/meta/classes/tinderclient.bbclass +++ b/meta/classes/tinderclient.bbclass @@ -13,12 +13,15 @@ def tinder_http_post(server, selector, content_type, body): #print errcode, errmsg, headers return (errcode,errmsg, headers, h.file) except: + print "Error sending the report!" # try again pass + # return some garbage + return (-1, "unknown", "unknown", None) + def tinder_form_data(bound, dict, log): output = [] - #br # for each key in the dictionary for name in dict: output.append( "--" + bound ) @@ -119,7 +122,7 @@ def tinder_build_start(d): f.write(report) -def tinder_send_http(d, status, log): +def tinder_send_http(d, status, _log): """ Send this log as build status """ @@ -127,16 +130,19 @@ def tinder_send_http(d, status, log): # get the body and type - content_type, body = tinder_format_http_post(d,status,log) server = data.getVar('TINDER_HOST', d, True ) url = data.getVar('TINDER_URL', d, True ) selector = url + "/xml/build_status.pl" - # now post it - errcode, errmsg, headers, h_file = tinder_http_post(server,selector,content_type, body) - #print errcode, errmsg, headers - #print h.file.read() + # now post it - in chunks of 10.000 charachters + new_log = _log + while len(new_log) > 0: + content_type, body = tinder_format_http_post(d,status,new_log[0:18000]) + errcode, errmsg, headers, h_file = tinder_http_post(server,selector,content_type, body) + #print errcode, errmsg, headers + #print h.file.read() + new_log = new_log[18000:] def tinder_print_info(d): |