From 9ffbd0d245512568b49b0ca7ab72c1126b5ee975 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: May 04 2017 16:58:19 +0000 Subject: Print out a useful summary at the end of watch output. Fixes #525. --- diff --git a/contrib/mbs-build b/contrib/mbs-build index 6b8aed3..d4da148 100755 --- a/contrib/mbs-build +++ b/contrib/mbs-build @@ -79,7 +79,11 @@ def watch_build(server, build_id): done = data["state_name"] in ["failed", "done", "ready"] - print('Module {name} is in state {state_name} (reason {state_reason})'.format(**data)) + template = ('{owner}\'s build #{id} of {name}-{stream} is in ' + 'the "{state_name}" state') + if data['state_reason']: + template += ' (reason: {state_reason})' + print(template.format(**data)) time.sleep(30) # Ideally we would use oidc.send_request here, but it doesn't support