summaryrefslogtreecommitdiffstats
path: root/meta/classes/tinderclient.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-07-23 17:57:13 +0000
committerRichard Purdie <richard@openedhand.com>2006-07-23 17:57:13 +0000
commitf75754d05bfac568380d2b6c8f7fb33186082a58 (patch)
tree362197d2834879469151c1aad9c9f853c4147c36 /meta/classes/tinderclient.bbclass
parent9cf2871aae7d2c6397dcd18cd4e9d2ea003c34bf (diff)
downloadpoky-f75754d05bfac568380d2b6c8f7fb33186082a58.tar.gz
tinderclient.bbclass: Update from .dev
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@543 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes/tinderclient.bbclass')
-rw-r--r--meta/classes/tinderclient.bbclass20
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
19def tinder_form_data(bound, dict, log): 23def 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
122def tinder_send_http(d, status, log): 125def 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
142def tinder_print_info(d): 148def tinder_print_info(d):