From df71f8e1737fe52239bee0d7a1c0512d170cb1a4 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Tue, 13 Sep 2016 15:27:14 -0500 Subject: [PATCH] Print percent complete when building --- tools/toolchains/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/toolchains/__init__.py b/tools/toolchains/__init__.py index 3e3c2b2671..9b56649f9c 100644 --- a/tools/toolchains/__init__.py +++ b/tools/toolchains/__init__.py @@ -341,7 +341,13 @@ class mbedToolchain: elif event['type'] == 'progress': if not silent: - msg = '%s: %s' % (event['action'].title(), basename(event['file'])) + if 'percent' in event: + msg = '{} [{:>5.1f}%]: {}'.format(event['action'].title(), + event['percent'], + basename(event['file'])) + else: + msg = '{}: {}'.format(event['action'].title(), + basename(event['file'])) if msg: print msg