diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-04-15 17:56:54 +0000 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-04-15 17:56:54 +0000 |
commit | f0a0d8ae00b91cba6117a61509229eb4c1f51803 (patch) | |
tree | f18943956383ff6f58b88e9710ba9777cc763061 /distbuild-helper | |
parent | a2aa9dfdc193316ca45d3d69afc423140cec544a (diff) | |
parent | fd401327611d8ef716a35cdf846eba4aa23cd609 (diff) | |
download | morph-f0a0d8ae00b91cba6117a61509229eb4c1f51803.tar.gz |
Merge branch 'baserock/richardipsum/distbuild_improve_annotation3'
Conflicts:
distbuild/build_controller.py
Reviewed by:
Lars Wirzenius
Daniel Silverstone
Sam Thursfield
Diffstat (limited to 'distbuild-helper')
-rwxr-xr-x | distbuild-helper | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/distbuild-helper b/distbuild-helper index 08e30f10..cdc1873e 100755 --- a/distbuild-helper +++ b/distbuild-helper @@ -155,7 +155,9 @@ class HelperMachine(distbuild.StateMachine): url = msg['url'] method = msg['method'] - assert method in ('HEAD', 'GET') + headers = msg['headers'] + body = msg['body'] + assert method in ('HEAD', 'GET', 'POST') logging.debug('JsonMachine: http request: %s %s' % (method, url)) @@ -166,7 +168,11 @@ class HelperMachine(distbuild.StateMachine): try: conn = httplib.HTTPConnection(netloc) - conn.request(method, path) + + if headers: + conn.request(method, path, body, headers) + else: + conn.request(method, path, body) except (socket.error, httplib.HTTPException), e: status = 418 # teapot data = str(e) |