diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-06-03 11:47:54 +0100 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-06-04 12:10:25 +0100 |
commit | 91b6f1a51c70183d05466259eb1cbc153ae971a4 (patch) | |
tree | e36973ce3dffb51ad3d3eb2f02e77891f4188f7f | |
parent | 11b7c965debe5da58cc8f07d516fcd44aff30389 (diff) | |
download | morph-91b6f1a51c70183d05466259eb1cbc153ae971a4.tar.gz |
Improve error message in _notify_annotation_failed
-rw-r--r-- | distbuild/build_controller.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/distbuild/build_controller.py b/distbuild/build_controller.py index c399939e..987f01f4 100644 --- a/distbuild/build_controller.py +++ b/distbuild/build_controller.py @@ -39,8 +39,9 @@ class _Built(object): pass class _AnnotationFailed(object): - def __init__(self, http_status_code): + def __init__(self, http_status_code, error_msg): self.http_status_code = http_status_code + self.error_msg = error_msg class _GotGraph(object): @@ -359,12 +360,13 @@ class BuildController(distbuild.StateMachine): logging.debug('Got cache response: %s' % repr(event.msg)) http_status_code = event.msg['status'] + error_msg = event.msg['body'] if http_status_code != httplib.OK: logging.debug('Cache request failed with status: %s' % event.msg['status']) self.mainloop.queue_event(self, - _AnnotationFailed(http_status_code)) + _AnnotationFailed(http_status_code, error_msg)) return cache_state = json.loads(event.msg['body']) @@ -577,8 +579,8 @@ class BuildController(distbuild.StateMachine): self._queue_worker_builds(None, event) def _notify_annotation_failed(self, event_source, event): - errmsg = ('Failed to annotate build graph: http request got %d' - % event.http_status_code) + errmsg = ('Failed to annotate build graph: http request got %d: %s' + % (event.http_status_code, event.error_msg)) logging.error(errmsg) failed = BuildFailed(self._request['id'], errmsg) |