diff options
Diffstat (limited to 'meta')
-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 6e10d0f34b..f544c203fe 100644 --- a/meta/classes/tinderclient.bbclass +++ b/meta/classes/tinderclient.bbclass | |||
@@ -13,12 +13,15 @@ def tinder_http_post(server, selector, content_type, body): | |||
13 | #print errcode, errmsg, headers | 13 | #print errcode, errmsg, headers |
14 | return (errcode,errmsg, headers, h.file) | 14 | return (errcode,errmsg, headers, h.file) |
15 | except: | 15 | except: |
16 | print "Error sending the report!" | ||
16 | # try again | 17 | # try again |
17 | pass | 18 | pass |
18 | 19 | ||
20 | # return some garbage | ||
21 | return (-1, "unknown", "unknown", None) | ||
22 | |||
19 | def tinder_form_data(bound, dict, log): | 23 | def tinder_form_data(bound, dict, log): |
20 | output = [] | 24 | output = [] |
21 | #br | ||
22 | # for each key in the dictionary | 25 | # for each key in the dictionary |
23 | for name in dict: | 26 | for name in dict: |
24 | output.append( "--" + bound ) | 27 | output.append( "--" + bound ) |
@@ -119,7 +122,7 @@ def tinder_build_start(d): | |||
119 | f.write(report) | 122 | f.write(report) |
120 | 123 | ||
121 | 124 | ||
122 | def tinder_send_http(d, status, log): | 125 | def tinder_send_http(d, status, _log): |
123 | """ | 126 | """ |
124 | Send this log as build status | 127 | Send this log as build status |
125 | """ | 128 | """ |
@@ -127,16 +130,19 @@ def tinder_send_http(d, status, log): | |||
127 | 130 | ||
128 | 131 | ||
129 | # get the body and type | 132 | # get the body and type |
130 | content_type, body = tinder_format_http_post(d,status,log) | ||
131 | server = data.getVar('TINDER_HOST', d, True ) | 133 | server = data.getVar('TINDER_HOST', d, True ) |
132 | url = data.getVar('TINDER_URL', d, True ) | 134 | url = data.getVar('TINDER_URL', d, True ) |
133 | 135 | ||
134 | selector = url + "/xml/build_status.pl" | 136 | selector = url + "/xml/build_status.pl" |
135 | 137 | ||
136 | # now post it | 138 | # now post it - in chunks of 10.000 charachters |
137 | errcode, errmsg, headers, h_file = tinder_http_post(server,selector,content_type, body) | 139 | new_log = _log |
138 | #print errcode, errmsg, headers | 140 | while len(new_log) > 0: |
139 | #print h.file.read() | 141 | content_type, body = tinder_format_http_post(d,status,new_log[0:18000]) |
142 | errcode, errmsg, headers, h_file = tinder_http_post(server,selector,content_type, body) | ||
143 | #print errcode, errmsg, headers | ||
144 | #print h.file.read() | ||
145 | new_log = new_log[18000:] | ||
140 | 146 | ||
141 | 147 | ||
142 | def tinder_print_info(d): | 148 | def tinder_print_info(d): |