From 10e7d1576c322e16a0111c4eea557503279ac5b3 Mon Sep 17 00:00:00 2001 From: Greg Brockman Date: Tue, 24 Aug 2010 02:29:34 -0400 Subject: [PATCH] Read error message from stdin for failed submit --- build-hooks/post-build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build-hooks/post-build b/build-hooks/post-build index eeb8467..3b9d3f4 100755 --- a/build-hooks/post-build +++ b/build-hooks/post-build @@ -96,12 +96,14 @@ def submit_completion_msg(succeeded, values, verbose=True, success=lambda x: x, values = dict(values) if succeeded: values['result'] = success(values['result']) + values['_extra'] = '' else: values['result'] = failure(values['result']) + values['_extra'] = '\nError: %s' % escape(sys.stdin.read()) for key in ['commit', 'pocket', 'principal']: values[key] = escape(values[key]) msg = """Submission of %(commit)s to be built in %(pocket)s %(result)s. -Build submitted by %(principal)s.""" % values +Build submitted by %(principal)s.%(_extra)s""" % values return msg def repo_creation_msg(succeeded, values, verbose=True, success=lambda x: x, failure=lambda x: x, -- 1.7.9.5